No AD?
Take a look at this.
http://www.picbasic.co.uk/forum/cont...54-All-Digital
No AD?
Take a look at this.
http://www.picbasic.co.uk/forum/cont...54-All-Digital
Dave
Always wear safety glasses while programming.
I looked into ALL DIGITAL and thought it would be the answer to all my prayers...
My Code is now as follows:
INCLUDE "ALLDIGITAL.pbp"
define SHOWDIGITAL 1
Main:
TOGGLE PORTE.0
PAUSE 1000
GOTO Main
Unfortunately I still cannot get any outputs.
When compiled I get the following messages in the results window:
ADCON1 = 0x0F
CMCON = 7
I have rechecked my software and hardware by programming another Pic, a 16F690, and this programs fine.
I am beginnig to think I may have a dodgy couple of IC's. I'll try and build another board up next Monday to rule out this, although I can program and read the pic with the setup I have now.
Any other things I can try?
I do not have this chip but give this a shot
Code:'18F4523 INTERNAL OSC 8MHZ Internal oscillator block, port function on RA6 and RA7 @ __CONFIG _CONFIG1H, _OSC_INTIO67_1H & _FCMEN_OFF_1H & _IESO_OFF_1H @ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H @ __CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H @ __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L DEFINE OSC 8 OSCCON = %01110000 ADCON1 = %00001111 CMCON = 7 Main: TOGGLE PORTE.0 PAUSE 1000 GOTO Main
Dave
Always wear safety glasses while programming.
FWIW, Dave your code works in sim, (I don't have that PIC either). 2 things I had to do: comment the configs cuz I was too lazy to go fix the .INC, and I had to tie MCLR high. So question for OP, Do you have MCLR enabled AND tied high? I ask because it's an easy to miss thing.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
I think the configs are the key here if the OP wants to use the internal OSC.
Dave
Always wear safety glasses while programming.
Well I must admit, being new to proteus, blinking that LED was like I had done it with my first PIC!! I was thinking about MCLR since I assume when I commented the configs it used the PBP default's.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
I may have to try a sim again, when I tried it a few years ago... well it just plan was not worth the effort.
The PBP inc configs for this chip are HS on the OSC.
Does your sim have a resonator or something attached?
And you may have hit it about MCLR.
Dave
Always wear safety glasses while programming.
Bookmarks