Hi there,
I am writing a program to run on the PICAXE 14M2, however I want to simulate the circuit in PICAXE VSM first, and as it doesn't support the 14M2 yet, and the 14M doesn't have any pwm pins, so I need to use the 28X1 for the simulation. So now I am writing a program to run on the 28X1. First thing I want to do is set-up symbols that map the the pins and then use these throughout the program, so to make it run on the 14M2 once I have it working correctly in the simulation, I can just change the pins that the symbols map to.
I am just starting to learn how to work with electronics, but have a background in C#. I have written some simple programs for the picaxe using the 08M, flashing LEDs, reading potentiometer values, and reacting to switchs etc...
I have read the documentation (eg; page 34 of picaxe_manual1.pdf) that gives the PICAXE-28X2/28X1/28X/28A Pinout.
I want to:
- Read a potentiometer value into leg 2 (pin a0)
- Read a potentiometer value into leg 3 (pin a1)
- A switch is connected to leg 15 (pin c4) and I want to check if this is low or high
- A switch is connected to leg 16 (pin c5) and I want to check if this is low or high
- Run pwm out leg 12 (pin c1)
- Run pwm out leg 13 (pin c2)
I have tried the following code and get the following error:
symbol _MotorForwardPWMPin = c1
^
Error: Unknown symbol - c1
What is the correct syntax to map these pins to symbols?
I can't seem to find any doco that tells me how to do it for the 28X1.
Thankyou for your time,
codeOwl
I am writing a program to run on the PICAXE 14M2, however I want to simulate the circuit in PICAXE VSM first, and as it doesn't support the 14M2 yet, and the 14M doesn't have any pwm pins, so I need to use the 28X1 for the simulation. So now I am writing a program to run on the 28X1. First thing I want to do is set-up symbols that map the the pins and then use these throughout the program, so to make it run on the 14M2 once I have it working correctly in the simulation, I can just change the pins that the symbols map to.
I am just starting to learn how to work with electronics, but have a background in C#. I have written some simple programs for the picaxe using the 08M, flashing LEDs, reading potentiometer values, and reacting to switchs etc...
I have read the documentation (eg; page 34 of picaxe_manual1.pdf) that gives the PICAXE-28X2/28X1/28X/28A Pinout.
I want to:
- Read a potentiometer value into leg 2 (pin a0)
- Read a potentiometer value into leg 3 (pin a1)
- A switch is connected to leg 15 (pin c4) and I want to check if this is low or high
- A switch is connected to leg 16 (pin c5) and I want to check if this is low or high
- Run pwm out leg 12 (pin c1)
- Run pwm out leg 13 (pin c2)
I have tried the following code and get the following error:
symbol _MotorForwardPWMPin = c1
^
Error: Unknown symbol - c1
What is the correct syntax to map these pins to symbols?
I can't seem to find any doco that tells me how to do it for the 28X1.
Thankyou for your time,
codeOwl