PDA

View Full Version : 4x8 matrixkey board



mook
- 10th April 2006, 10:23
Hi, I am very green in the field of software please help required here.
I have designed an interface for transmitting keyboard data by help of a rs422 driver.
I am using a pic16f877 with pull down resistors on my input portD.
My scanning port is portA which I have configured as output.
I intend to send the 4+8bits at a go with startbit=0 and stopbit=1.
There is no parity and I am using 8Mhz clockfrequency.
1. How do I make a timer routine which is continuosly running and set a flag at every 500uS for instance? So that there is a timer interrupt everytime a flag commes up.
2. How do I make sure that everytime a key is pressed data is sent to portc,6?
3. Simply how can I make such a program in asm not bas? this is because I am more familier with this.
I will be ready to answer any Qs on the project.