Last edited by Acetronics2; - 17th March 2010 at 13:45.
************************************************** ***********************
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 " !!!
*****************************************
Hi, I now got a chance to come back to this problem of my pic. Apologies for the delay in updating you.
OK, I have programmed another 12C671 taking care of static discharges. Now the voltage part on GP3 is working fine. It is pulled high at 5V. But making it low does not initiate the required serout signal.
Is there something I am missing in the code to make proper use of GP3 as an input?
Thanks
___________________
WHY things get boring when they work just fine?
Anyone there?
Please help
___________________
WHY things get boring when they work just fine?
I never responded because I do not see where the problem is.
Have you changed the code or configs any? If you did re-post.
Did you try clearing the WDT like Alan suggested?
Can you post a schematic or a picture of your setup?
Dave
Always wear safety glasses while programming.
Hi, thanks for the reply.
I did changed the config and enabled the WDT. The code looks like this now:
My circuit only gets power when any button is pressed. I can try to scan the paper after drawing the circuit or try to find a software over the net if you think the circuit could be the culprit.Code:DEFINE OSC 4 Define OSCCAL_1K 1 @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _CP_ALL '// For PIC12C671 include "modedefs.bas" '// Define variables ToTx VAR GPIO.0 PAUSE 30 '// OSCCAL=0 TRISIO = %111110 OPTION_REG = %10001000 ToTx = 0 INTCON=0 ADCON0.0=0 ADCON1=7 send: if gpio.1=0 then serout ToTx,N2400,["G0"] Low ToTx pause 10 endif if gpio.2=0 then serout ToTx,N2400,["G1"] Low ToTx pause 10 endif if gpio.3=0 then serout ToTx,N2400,["G3"] Low ToTx pause 10 endif if gpio.4=0 then serout ToTx,N2400,["G4"] Low ToTx pause 10 endif goto send end
But I would like to add that rest all the buttons are working fine, so I believe the circuit is ok, GP3 is connected the same way as all other pins. Even the voltage on that pin behaves the same way as on any other pin under same circumstances but no DATA OUTPUT is there.
___________________
WHY things get boring when they work just fine?
Can you try making GPIO3 active high?
Dave
Always wear safety glasses while programming.
Yes I can do it to check but I really need to find an answer to make it work Active Low. I will reply with an update with Active High.
___________________
WHY things get boring when they work just fine?
Bookmarks