J A Hawtin
Member
Hi!
Picked up on an interesting thread in user projects the other day “Connecting a Picaxe 28 X2 to a DCC decoder” and thought this could be interesting if I could make it work. Probably a bit above my ability level at the moment, but what the hec.
I’ve used a 28x1 in place of an x2 and a 7 segment LED display to display the speed steps in place of the LCD used by the person who posted the thread “Sierrasmith71”.
Sorted out the PWM pulse width for the speed steps in the decoder I’m using and using “pulsin” and “select case”, got the speed steps to read out on the 7 segment LED, as per the thread. I then tried to link a motor step procedure to a speed step and this is where I came unstuck!
When I run the program it bypasses the speed step indication and runs the motor through its step procedure and then keeps repeating the program. I put a pause in between the two “gosubs” to see if the speed step indication is working, it is, but after the pause the LED returns to zero and the motor runs. Where am I going wrong?
On the attached photo ignore the components to the right of the main breadboard that’s another project I’m working on.
Picked up on an interesting thread in user projects the other day “Connecting a Picaxe 28 X2 to a DCC decoder” and thought this could be interesting if I could make it work. Probably a bit above my ability level at the moment, but what the hec.
I’ve used a 28x1 in place of an x2 and a 7 segment LED display to display the speed steps in place of the LCD used by the person who posted the thread “Sierrasmith71”.
Sorted out the PWM pulse width for the speed steps in the decoder I’m using and using “pulsin” and “select case”, got the speed steps to read out on the 7 segment LED, as per the thread. I then tried to link a motor step procedure to a speed step and this is where I came unstuck!
When I run the program it bypasses the speed step indication and runs the motor through its step procedure and then keeps repeating the program. I put a pause in between the two “gosubs” to see if the speed step indication is working, it is, but after the pause the LED returns to zero and the motor runs. Where am I going wrong?
On the attached photo ignore the components to the right of the main breadboard that’s another project I’m working on.
Attachments
-
1.8 KB Views: 22
-
37.4 KB Views: 35