Hi mackrackit
Here it is.
To be clear I have removed the PIC from it's PCB and stuck it on a breadboard and just programmed it with these 10 lines of code. I have programmed it both with MPASM and PM with line in inc file restored.
None of the pins are connected apart from LED on PORTA.0 which flashes. Do that on RA4 or RA% and nothing. I get a nice square wave at 1Mhz on RA4 and a sawtooth on RA5. Logic tells me I am not programming an I/O on RA4/RA5 but can't see why. Maybe there is something obvious that I keep overlooking - just too tired or too stupid. Hope you find it!!
Code cut & pasted
INC FileCode:@__CONFIG _INTOSCIO & _WDT_ON & _MCLRE_OFF & _CP_OFF ANSEL = $00 CMCON0 = 7 OSCCON = $60 TRISA = $00 TRISC = $00 Start: TOGGLE PORTA.0 PAUSE 250 goto start
regardsCode:NOLIST ifdef PM_USED LIST include 'M16F684.INC' ; PM header device pic16F684, intrc_osc_noclkout, wdt_on, mclr_on, protect_off XALL NOLIST else LIST LIST p = 16F684, r = dec, w = -302 INCLUDE "P16F684.INC" ; MPASM Header ;__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF NOLIST endif LIST
Adrian




Bookmarks