No, it is 5V only. i.e. +5V & 0V.
No, it is 5V only. i.e. +5V & 0V.
___________________
WHY things get boring when they work just fine?
Hi, FC
Reading that , ... I think you didn't show or tell us everything :My circuit only gets power when any button is pressed.
OR the code shown only is a part of ...
OR you should show the Hardware side ...
no way for us to help further not knowing what you did and how you did it ...
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 " !!!
*****************************************
Hi, I have attached the schematic and this is the complete code I have shown here. Hope to find a solution soon.
___________________
WHY things get boring when they work just fine?
The way I read this, from the data sheet
Every time you press the GPIO.3 button the chip will go into a continuous reset.Most other registers are reset to a “reset
state” on Power-on Reset (POR), MCLR Reset, WDT
Reset, and MCLR Reset during SLEEP
The chip never gets to read the configuration to see that MCLR is turned off.
Dave
Always wear safety glasses while programming.
Comments:
1) - There are no smoothing capacitors either side of the regulator - what are you using to provide the 12v supply. If it's simply a bridge rectifier off a transformer then the supply will need smootthing.
2) - I assume the diodes are LEDS ? If so then you would be better off putting them in series with the resistors rather than in parallel.
3) - If they are not LEDS, then try removing them from the circuit, there may be some reverse bias or something causing the current to flow and possibly short out the supply ?
As Dave has mentioned - It does sound as if you are constantly resetting the chip before it configures itself.
With reference to your schematic, I am sure you have mistaken in drawing it, while the hardware is correctly wired, otherwise you will short the 12 Volts as soon as you connect it to the circuit. ( see the snap posted and compare it with your circuit)
As far as the code is concerned, I would place a delay below the label send
Code:send: PAUSE 10 if gpio.1=0 then serout ToTx,N2400,["G0"] Low ToTx pause 10 endif
Al.
All progress began with an idea
Aratti, your eye for detail is good. I made mistake in drawing it. Thanks for correcting it. I tried with a pause of 50mS before going to label send, but it didn't worked.
Malcom, Mackrackit, thanks for pointing out the smoothing capacitors and resetting problem.
I tried the smoothing capacitors at in & out of 78L05. At one configuration of 47uF at input & 22uF at output, everything works fine with one particular 12V battery I have but does not work when I change the battery. That particular battery had a voltage of 12.96V, I changed it, the other battery had 12.16V. I tried many times with with 12.96V, it works fine all the time but not when I change the battery. I tried different values of capacitors and the results were very strange, at few other configurations of the capacitors, it even affected other pins as well. All these trial were done with 12.96V battery.
After seeing these results, I believe the problem is related to correct configuration of capacitors. Any comments?
I would like to ask two things:
1) Is there any formula or way to find out the correct capacitor values at in & out of 78L05?
2) Is there any way around the resetting problem of GP3, I would like to try it as well to see if that is the root cause of this problem?
Bruce, thanks for the reply, I will try with _PWRTE_OFF and update this thread.
Thanks everyone for trying to help.
___________________
WHY things get boring when they work just fine?
Bookmarks