PIC Simulator

Status
Not open for further replies.

hi TT,
When you post a question you must give more details or explanation of what it is you are trying to do, at the moment I have to keep guessing what you want.

Try OPTIONS 'configuration bits'
 
Last edited:
hi TT,
When you post a question you must give more details or explanation of what it is you are trying to do, at the moment I have to keep guessing what you want.

Try OPTIONS 'configuration bits'
sorry for make you guessing

i still try to find a right word
 
Last edited:
i try your suggestion

but it have two words

Define CONF_WORD = 0x2F14
Define CONF_WORD_2 = 0x3EFF

what should i select ?

hi,
Why have you chosen these CONFIG settings.??
You have code protect Enabled.
 

Attachments

  • AAesp02.gif
    69.6 KB · Views: 395
i never understand what does CPD and CP for

what does it for ?

i also want to know the other config for

like LVP what it for if we not even programming with low voltage ?

WRT , FCMEN , BOR and etc ?
 
Last edited:
hi TT,
This is the Simulator Forum, this type of question should be asked on the Micro-Controllers forum so that other members can answer.
i want to know the code for the PIC Simulator ?

it seems the code you give register is for another PIC ,
 
Last edited:
hi,
Do you mean like this.?
Code:
'16F886 and 16F88

AllDigital

Define SIMULATION_WAITMS_VALUE = 1

Define LCD_BITS = 4
Define LCD_DREG = PORTB
'Define LCD_DBIT = 8

Define LCD_RSREG = PORTB
Define LCD_RSBIT = 3

Define LCD_EREG = PORTB
Define LCD_EBIT = 2

Define LCD_RWREG = PORTB
Define LCD_RWBIT = 1

Dim adcv0 As Word


TRISA = 1  'RA0 (AN0) is input
TRISB = 0  'PORTB is output

ANSEL = 0x01
'Initialize the A/D converter
ADCON1 = %00000001  'Make AN0 analog inputs,
'make reference voltage = VDD
ADCON0 = %11000001  'A/D clock is internal RC, select AN0

Lcdinit

loop:
Lcdcmdout LcdLine1Home
Adcin 0, adcv0
Lcdout "adc test=", #adcv0, "  "

Goto loop

End
 
i think i just need to add extra line

with this one
Code:
ANSEL = 0x01
ADCON1 = %00000001  
ADCON0 = %11000001

and its works !

problem solved
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…