J A Hawtin
Member
Hello!
I only joined the other day so this is my first posting, in fact it’s my first involvement with any forum! So please bear with me until I get the hang of things.
I’m using a Picaxe 28x1 to control a seven segment display in conjunction with a 4511B IC, hooked up generally as described in section 3 of the Picaxe manual.
The set up is part of a model railway layout. I trigger a number of point motors through a diode matrix which gives me a particular route. I also input that trigger signal onto an input pin of the Picaxe28x1 which gives me a corresponding route number on the seven segment display and it all works very well. That is until I power down at the end of an operating session. When I power up for the next session the previous routes set are still in place, they won’t have changed, but the seven segment displays have reset themselves to zero! Therefore route indication is lost. So – the question I’m asking is – is it possible to store in the Picaxe28x1 memory the last command it sent to the seven segment driver before power down and re transmit that to the driver on the next power up to set the seven segment display to the last route selected. Or am I asking too much? The code I’m using is as below.
main: if pin0 = 1 then route1
if pin1 = 1 then route2
if pin2 = 1 then route3
if pin3 = 1 then route4
if pin4 = 1 then route5
goto main
route1: let b1 = 1
let pins=b1
goto main
route2: let b1 = 2
let pins=b1
goto main
route3: let b1 = 3
let pins=b1
goto main
route4: let b1 = 4
let pins=b1
goto main
route5: let b1 = 5
let pins=b1
goto main
I only joined the other day so this is my first posting, in fact it’s my first involvement with any forum! So please bear with me until I get the hang of things.
I’m using a Picaxe 28x1 to control a seven segment display in conjunction with a 4511B IC, hooked up generally as described in section 3 of the Picaxe manual.
The set up is part of a model railway layout. I trigger a number of point motors through a diode matrix which gives me a particular route. I also input that trigger signal onto an input pin of the Picaxe28x1 which gives me a corresponding route number on the seven segment display and it all works very well. That is until I power down at the end of an operating session. When I power up for the next session the previous routes set are still in place, they won’t have changed, but the seven segment displays have reset themselves to zero! Therefore route indication is lost. So – the question I’m asking is – is it possible to store in the Picaxe28x1 memory the last command it sent to the seven segment driver before power down and re transmit that to the driver on the next power up to set the seven segment display to the last route selected. Or am I asking too much? The code I’m using is as below.
main: if pin0 = 1 then route1
if pin1 = 1 then route2
if pin2 = 1 then route3
if pin3 = 1 then route4
if pin4 = 1 then route5
goto main
route1: let b1 = 1
let pins=b1
goto main
route2: let b1 = 2
let pins=b1
goto main
route3: let b1 = 3
let pins=b1
goto main
route4: let b1 = 4
let pins=b1
goto main
route5: let b1 = 5
let pins=b1
goto main