VGA_Keyboard_Demo
In the course of beating donw the bugs in my PRC-VGIO board in both the PS2 connections and the VGA connections, I needed sothing that tested both together. I took the library demos VGA_Text and Keyboard_Demo (which uses the TV output) and combined them to make what amounst to be ing VGA_Keyboard_Demo. I also renamed the Keybaord_Demo to TV_Keybaord_Demo, to make the differences obvious.
Anyway, I thought someone else might find it useful. The changes was trivial but no sense in reinventing the wheel!
www.wulfden.org/PRC/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cheers ... brian riley, n1bq, underhill center, vermont
See the K107 Serial LCD Controller at
www.wulfden.org/k107/
Anyway, I thought someone else might find it useful. The changes was trivial but no sense in reinventing the wheel!
www.wulfden.org/PRC/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cheers ... brian riley, n1bq, underhill center, vermont
See the K107 Serial LCD Controller at
www.wulfden.org/k107/
Comments
Thanx for the file...educational for me at my level.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Richard in Michigan
You're going to have to supply more information, maybe attach the source file or archive for your program. One of the calls in keyboard.spin (getkey) will wait until a key is pressed. Another call (key) will return a zero if there are no keypresses in the key buffer. There's a call (gotkey) that will return true if there are keypresses in the buffer and false otherwise. It may be that your program is calling getkey where you should be checking for a keypress with gotkey first, updating your display if false or reading the keypress if true.
Mike
The suggestions you gave were helpful. I can now print to screen the hex equivalent of the keyboard keypress. As you may recall I have been working on Encoder.spin to display to VGA screen. With your help, I am now able to use four encoders, print to screen with fixed decimal point, print + in green and - in red. I still need to calibrate the encoder counts to inches and thousandths of inches, and I would like to reset individual encoders at the very least, using the keyboard. The encoder.spin uses an internal buffer containing the position, updates it then writes it to main memory. Is there anyway I can get to the object encoder.spin internal buffer to modify it?
I was under the impression that the gray code truth table and quadrature truth table were different. Once I understood that they were the same, and that I did not need to modify encoder.spin, everything worked out very nicely.
If interested, I can post my work so far.
There is no way to get to a cog's memory from outside the cog other than to erase it and start over (COGNEW/COGINIT). You could modify the encoder.spin routine to look in main memory (maybe after the area where it copies its values) for updates to its internal buffer, but that's all you can do.
Typically, you might have a flag byte for each encoder and, if the flag is non-zero, the encoder routine resets the corresponding buffer entry, then zeroes the byte (to indicate to the Spin routine that the reset was done).
Mike