EmbeddedRelated.com
Forums

Continuous Loop

Started by outhman82 December 10, 2005
I wrote the following code for my BX-24 processor, executed it and it
worked fine and now I can't get the board to halt.

Option Explicit

Public Sub Main()

Const PinNumber As Byte = 13
Dim iV As Integer
do WHILE(1=0)
iV =GetADC(PinNumber)
debug.print cstr(iV)
if (iV<5)then
Call PutPin(16, bxOutputHigh)
else
Call PutPin(16, bxOutputLow)
end if
call delay(0.01)
loop End Sub
When I execute a different program, it says to press the reset button
on the processor, I press the reset button Error code 203: Unable to
halt BasicX, Reset? I think it's because it's continuously looping and
won't stop. I tried turning off the power of the board and
disconnecting the connection to the computer (I'm using an serial-USB
cord) and it hasn't done anything.

Can somebody help me? I am in need of desperate help.



Turn the power off, hit program then when you see "retry" on the PC
screen, power up the bx24.
outhman82 wrote:

> I wrote the following code for my BX-24 processor, executed it and it
> worked fine and now I can't get the board to halt.
>
> Option Explicit
>
> Public Sub Main()
>
> Const PinNumber As Byte = 13
> Dim iV As Integer
> do WHILE(1=0)
> iV =GetADC(PinNumber)
> debug.print cstr(iV)
> if (iV<5)then
> Call PutPin(16, bxOutputHigh)
> else
> Call PutPin(16, bxOutputLow)
> end if
> call delay(0.01)
> loop > End Sub >
> When I execute a different program, it says to press the reset button
> on the processor, I press the reset button Error code 203: Unable to
> halt BasicX, Reset? I think it's because it's continuously looping and
> won't stop. I tried turning off the power of the board and
> disconnecting the connection to the computer (I'm using an serial-USB
> cord) and it hasn't done anything.
>
> Can somebody help me? I am in need of desperate help. > SPONSORED LINKS
> Microprocessor
> <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3sicx&w4=Pic+microcontrollers&w551+microprocessor&c=5&s5&.sig=_YKW_KvdWM7nsvZLWwMhnw>
> Microcontrollers
> <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3sicx&w4=Pic+microcontrollers&w551+microprocessor&c=5&s5&.sig=UfvbdAF0r5o48CkzYmXRww>
> Basicx
> <http://groups.yahoo.com/gads?t=ms&ksicx&w1=Microprocessor&w2=Microcontrollers&w3sicx&w4=Pic+microcontrollers&w551+microprocessor&c=5&s5&.sig=Nggd_ZUrVU6qzPviDXpKSw>
>
> Pic microcontrollers
> <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3sicx&w4=Pic+microcontrollers&w551+microprocessor&c=5&s5&.sig=dhYy34C8Xq6aeJfBsd7maw>
> 8051 microprocessor
> <http://groups.yahoo.com/gads?t=ms&k51+microprocessor&w1=Microprocessor&w2=Microcontrollers&w3sicx&w4=Pic+microcontrollers&w551+microprocessor&c=5&s5&.sig=iJA-sY2QEUOfoaMmW8c17g >
>
> >. >
>




maybe a good idea to include a Call Sleep (0.0) into for routine.

--- In basicx@basi..., Jepsen Electronics & Acoustics Ltd
<njepsen@i...> wrote:
>
> Turn the power off, hit program then when you see "retry" on the
PC
> screen, power up the bx24.
> outhman82 wrote:
> ... now I can't get the board to halt.
[]