28x1 coding

Hi,

Writing an updated LED chaser with a 28x1.  The chaser is fine with output on pins B.0 to B.7 and portc 0 to portc 6 it also contains an interrupt on portc 7.  All this is fine.  however, I only want to start the sequence if porta pin0 is high.  When I switch off a.0 I want to stop the program.  However with the following IF statement the code continues to run even after a.0 is switched off:

main:

if porta pin0 = 1 then

.

.

endif

goto main

can anyone tell me why? and how to fix this?  this is the last thing I need to correct before I am ready to put this into an actual system.

 

many thanks

Magnus

I’ve never used a PICAXE so I may be wrong…

I’ve never used a PICAXE so I may be wrong…

But looking at the manual I noticed that for newer parts you need to use the following syntax;

if pinA.0 = 1 then

instead of the

if porta pin0 = 1 then

I may be totally off base (and if so, I would appreciate one of you PICAXE guru’s correcting me on this), but you might try that and see if it yields any results.