I'm pretty new at this

Russlk

New Member
Thanks, now I want to write to portb (picaxe 28X1).
let portb = H gives a syntax error; why? portb is an output, why can't I write to it?
 

westaust55

Moderator
With respect to the use of the SYMBOL command, please have a look at PICAXE manual 2 (V6.9) page 6
The format for the SYMBOL command is:
SYMBOL new_name = variable
New_name is often also referred to as an alias.
In summary,
- you never have an equal sign between the directive (SYMBOL) and the new_name
- you do not assign a Rev Ed pre-defined variable name (ie b0 – b13) as the new_name.
So as stated by SvejK, the correct program line is:
SYMBOL H = b1
 

westaust55

Moderator
Russlk,

Also as I advised to you in your earlier thread on 15th September:
Svejk has given you the solution.

Port B is the standard ouput port for the 28X1 and thus there is no need (or ability) to refer to that group of output pins as port B
Have a look at page 113 of the PICAXE manual 2 (V6.9). It is ether pins or pinc

Set/clear all outputs on the main output port (let pins = ). <=== This port B by defaultSet/clear all outputs on portc (let pinsc =)
Note when the topic is a continuation of the same project or problem, there is no need to start a new thread. Just add to the existing thread
 

hippy

Ex-Staff (retired)
If you really want to use "PORTB=x" you can define "Symbol PORTB = pins". There are two caveats ...

It won't reference the physical PICmicro PORTB on other PICAXE variants.

When you do "b0=PORTB" it won't read physical PICmicro PORTB, but a different port.
 
Top