Not sure I remember, but I think the comparators on that chip are under the
CM1CON0 and CM2CON0 registers. And A4 is open collector.
http://www.picbasic.co.uk/forum/showthread.php?t=562
You may want to look at the inc file in MPASM to be sure.
Not sure I remember, but I think the comparators on that chip are under the
CM1CON0 and CM2CON0 registers. And A4 is open collector.
http://www.picbasic.co.uk/forum/showthread.php?t=562
You may want to look at the inc file in MPASM to be sure.
Dave
Always wear safety glasses while programming.
Thanks mackrackit but still no joy. I've tried the open collector thing and I believe the COMCON0 to be right. This is puzzling me. I would have thought there should not be clock on A4 when INTOSCIO is chosen as a fuse. I'll keep trying (or change the PIC type.....!!!!)
Adrian
Hi,
May be the underscore befre INTOSCIO ... ???
Beer for everyone !!!
_EXTRC_OSC_NOCLKOUT EQU H'3FFE'
_EXTRC_OSC_CLKOUT EQU H'3FFF'
_INTOSCIO EQU H'3FFC'
_INTOSC EQU H'3FFD'
_EXTRCIO EQU H'3FFE'
_EXTRC EQU H'3FFF'
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
First person to find them all gets the beer...;o}Code:@_CONFIG INTOSCIO & _WDT_ON & MCRE_OFF & _CP_OFF ; 5 errors here ANSEL = $00 OSCON = %01100001 ; 1 error here CMCON0 = 7 ; 1 (maybe 2) errors here TRISA = $00 TRISC = $00
Last edited by Bruce; - 8th November 2008 at 16:29.
Hi Alain
Sadly not, so no beer - not even a good Cotes du Rhone from E.Guigal........! Unfortunately this was a typo error on my post. It was correct in the programme. Rest of programme is fine but RA4/RA5 stubbornly refuse to do anything useful. If someone out there has a 16F684 I'd like them to try it!
adrian
Sorry for wrong information. This should be Pic16F684 not 685. Must be getting tired. HOWEVER it still doesn't work!!
Hi Bruce
Working through the errors!
OSCCON is typo in my post - OK in programme
MCLRE ditto
underscore in INTOSCIO ditto
Can't see anything wrong with CMCON0Apologise for wrong PIC reference in post and typos
Still stuck
Adrian
Hi Bruce
My programme is exactly the same as yours (I removed the 1 from OSCCON bit 0). It is just the same as before. I have a 1 Mhz square wave on pin 4 and a sawtooth waveform on pin 5. I have removed everything else in the programme now apart from a LED flashing on RA1. If I try to do that on RA4/RA5 - zilch. The relevant config line was commented out in the PBP pic inc file but I had also tried programming both ways with no luck.
It would be a bit different if it's not a 685. Try something like this, and make sure your
device programmer keeps your config settings. You'll also need to comment out the default
config setting in the 16F684.INC file for MPASM.
Code:@ __CONFIG _INTOSCIO & _WDT_ON & _MCLRE_OFF & _CP_OFF ANSEL = $00 OSCCON = %01100000 CMCON0 = 7 TRISA = $00 TRISC = $00
Bookmarks