Simple 28x question, please help !

tonto2k

Member
Hi,

I have recently purchased a 28x chip and the picaxe axe020 motor controller.

I have installed a l293d chip and I used this board to control 2 motors speed and direction.

The problem I have however is I cannot get the inputs to work ! I want to input on pin 17, this is input/output 6. The default setting is input so I assumed I could just define a symbol at the top of the program something like:

symbol input1 = portc pin17

Using portc to indicate the pin.

I also tried:

symbol input1 = portc 6
(I was thinking input pin 6)

When I try either of these codes I just get an error saying 'error-mistake in this line'

So..... All I need to know is, what is the code for using inputs 0 - 7 (pins 11 to 18)???

Hope someone can help ! :)

Thanks,
Paul.

 

hippy

Technical Support
Staff member
If I recall correctly those are the default inputs on a 28X so are simply refered to as 'pin6' etc ...

- SYMBOL myInput = pin6
- IF pin6 = 1 THEN ...
- IF myInput = 1 THEN ...
- LET b0 = pin6
 

Technical

Technical Support
Staff member
Hippy is correct - but your original line also tried to use 'input1' which is also a reserved word and so would never work with any symbol command (see list of reserved words at the back of the manual part1 (or just look for words that change colour when typing in colour syntax mode)).

Use a different term such as 'myinput1'
 
Top