The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
Subject: Re: Very frustrated with PicBasic -- Help!
X-Newsreader: Forte Agent 1.91/32.564
Date: Mon, 16 Sep 2002 09:56:37 GMT
NNTP-Posting-Date: Mon, 16 Sep 2002 10:56:37 BST
On 16 Sep 2002 02:43:29 GMT, Mike Poulton wrote:
>Any program that includes the "toggle" instruction does not work. The
>PIC freezes at the beginning of the program (not at the instruction).
>Same for "pulsin", "pulsout", and "serout" instructions. "PWM" works
>Occasionally, a pin's state can successfully be read and used to control
>program flow. Usually not. For example, the following code doesn't
>If GPIO.4=1 Then start
>It ignores the state of GPIO.4 and loops through the whole program. That
>"input" instruction shouldn't be necessary, but I used it anyways.
>Whether I use "If...Then" or "While...Wend" doesn't matter. The pin
>number and the chosen state don't matter, either. Does anyone know
>what's going on here?
Could be hardware-related depending on what is connetcted to the input pin i.e
value of pull-up resistor and capacitance of pcb/cable/debounce cap.
There was a similar problem (but with assembler) posed in the PICLIST in the
last few days and this was the answer.
If you add a couple of seconds delay before reading the input pin, does it then
get the right state? Giving the capacitance time to charge.
You might try repeating the question in the PICLIST if this does not work.
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup