Brandon_K
Member
Hey guys,
I have a scenario where I need to fill a data register with characters, likely alpha numeric.
Lets say I have 4 momentary push buttons, button 1 has a value of "a", button 2 has a value of "b" and so on.
I need to copy those button presses to a register that will contain up to 8 characters. So if button 1 is pressed, then 2, then 1, then 2, 3, 4, 3, 2, the register would contain "ABABCDCB". If button 4 was then pressed again, the first "A" would get pushed out and the resulting data would be "BABCDCBD"
I'm using Productivity 2000 hardware and there is a FIFO instruction, but I'm having a difficult time wrapping my head around some of the terminology of peek, push, pop, etc. The instruction seems overly complex for my needs.
I have a scenario where I need to fill a data register with characters, likely alpha numeric.
Lets say I have 4 momentary push buttons, button 1 has a value of "a", button 2 has a value of "b" and so on.
I need to copy those button presses to a register that will contain up to 8 characters. So if button 1 is pressed, then 2, then 1, then 2, 3, 4, 3, 2, the register would contain "ABABCDCB". If button 4 was then pressed again, the first "A" would get pushed out and the resulting data would be "BABCDCBD"
I'm using Productivity 2000 hardware and there is a FIFO instruction, but I'm having a difficult time wrapping my head around some of the terminology of peek, push, pop, etc. The instruction seems overly complex for my needs.