PIC Simulator


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:
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: 481
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:
i never understand what does CPD and CP for

what does it for ?

Its for when you program a PIC and you dont other people to be able to read the program.
I would recommend you keep code protect disabled for your projects.
 
hi
how can i set RA0 as analog input ?

for 16F886

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.
 
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

hi,
So when are you going to post your next program....
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…