Add CMCON=7 to your code.
Al.
Oops, i missed that off the list. I did try that after reading and old thread about a PIC16F877A. Im sure the PIC16F87 works with or without it but i had tried it anyway and still no luck
Last edited by The Master; - 3rd September 2009 at 09:13. Reason: Fixed spelling mistake
Hi,
Your PIC config sequence ... just is missing !!!
Try to add to your Code top
you just have to translate the config lines for MCS ... if you use it.Code:'****************************************************************************** 'Configuration '****************************************************************************** 'Program Configuration Register 1 @ __CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_ON & _PWRTE_ON & _WDT_ON & _HS_OSC 'Program Configuration Register 2 @ __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF ... ' Pour 16F88 ANSEL = 0 ADCON0 = 0 ADCON1 = 0 CMCON = 7 CVRCON = 0 CCP1CON = 0
Alain
Last edited by Acetronics2; - 3rd September 2009 at 10:02.
************************************************** ***********************
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 " !!!
*****************************************
From your code you have portB.2 set as an input but it seems not used. Is this input pin floating?Code:TRISB=%00000100
Al.
All progress began with an idea
Acetronics: The fuses are set in micropro (the software that programs the chip). I will try adding all of the other lines to the code though.
aratti: portB.2 is used as a serial input. Its not used in this test code but it will be eventually
************************************************** ***********************
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 " !!!
*****************************************
Ive tried adding those lines. It wouldnt compile with the first 3 so i commented those out. Its still not working properly. It does seem like its trying to work now and for a few seconds the lights flash at the right speed then they will start to hang in 1 state or flash rapidly.
I think ive seen a chip do this before when the supply cable is faulty but ive replaced that. The PSU is one i always use for things like this and is working properly, there are capacitors on the board and ive even tried adding an extra external capacitor
Im going to breadboard the circuit up with only an LED connected to see if i can get it working. Is there anything else i can check?
Bookmarks