Need another set of eyes
Oldbitcollector (Jeff)
Posts: 8,091
I'm beating my head against the desk on this.. Perhaps someone will see something I don't.
This chunk of code is excepting data from an 8bit bus. The trick is that the input bus lines are not running at consistent speeds. So I'm using a 9th line (pin8) to trigger when the lines should be looked at again. Perhaps there is a better way?
The basis idea is that when binary 11 is received, the lines are check again for a new input for b1,
when binary 12 is received , the lines are checked for b2 and so on.
This chunk of code is excepting data from an 8bit bus. The trick is that the input bus lines are not running at consistent speeds. So I'm using a 9th line (pin8) to trigger when the lines should be looked at again. Perhaps there is a better way?
The basis idea is that when binary 11 is received, the lines are check again for a new input for b1,
when binary 12 is received , the lines are checked for b2 and so on.
repeat cmdkey := ina[noparse][[/noparse] 31] << 7 + ina[noparse][[/noparse] 30] << 6 + ina[noparse][[/noparse] 15] << 5 + ina[noparse][[/noparse] 9] << 4 + ina[noparse][[/noparse] 4] << 3 + ina[noparse][[/noparse] 5] << 2 + ina[noparse][[/noparse] 6] << 1 + ina[noparse][[/noparse] 7] if cmdkey == 11 repeat until ina[noparse][[/noparse]8] == 1 data := ina[noparse][[/noparse]31] << 7 + ina[noparse][[/noparse] 30] << 6 + ina[noparse][[/noparse] 15] << 5 + ina[noparse][[/noparse] 9] << 4 + ina[noparse][[/noparse] 4] << 3 + ina[noparse][[/noparse] 5] << 2 + ina[noparse][[/noparse] 6] << 1 + ina[noparse][[/noparse] 7] b1 := data gr.SimpleNum(464,30,b1,3) cmdkey := 0 repeat until ina[noparse][[/noparse]8] == 0 if cmdkey == 12 repeat until ina[noparse][[/noparse]8] == 1 data := ina[noparse][[/noparse]31] << 7 + ina[noparse][[/noparse] 30] << 6 + ina[noparse][[/noparse] 15] << 5 + ina[noparse][[/noparse] 9] << 4 + ina[noparse][[/noparse] 4] << 3 + ina[noparse][[/noparse] 5] << 2 + ina[noparse][[/noparse] 6] << 1 + ina[noparse][[/noparse] 7] b2 := data gr.SimpleNum(464,60,b2,3) cmdkey := 0 repeat until ina[noparse][[/noparse]8] == 0 ' ... additional lines
Comments
Also the b1 := data is redundant if you simply assign the data directly to b1/b2 in the first place.
*Peter*
I didn't test this, but the rough idea is close. Hopefully Mike will fix the Ack value for me.
Anyways, it's just an idea that might simplify your project. Mouser has the DIP in stock for $1.80.
Post Edited (TChapman) : 3/28/2007 9:07:22 AM GMT
I dropped back to 8 bits using the 8th as my toggle, and things clicked right into place.
I'm taking the propeller to a retro-computer show next month with a demonstration of
a Commodore 64-->Propeller Vector VGA demo. It demonstrates the concept of using
something like the Propeller as an add-on for retro-hobbiests like myself.
Time to order a couple more protoboards for the road!
I suspect we'll pick-up several more "propeller heads" as a result of the demo, as I intend
to demonstrate FemtoBASIC, HSS, as well as the composite Graphics Demo.
(Wonder if it's too late to adapt my interface for the Speech stuff? )
Here's a couple shots of my project..
(The graphics are being commanded via 8bit interface from my 1980's computer.)
BTW, thanks to several who have helped me learn a LOT in the last two weeks.
--this is the most fun I've had in a long time, and the most sleep I've lost ever..
Oldbitcollector