Tony_Stoynov Posted January 2, 2006 Report Share Posted January 2, 2006 Hi leowjunwei,i not forgot, but i just change the file in my previews post, but i will atach the file to this post too. RS_PS2.pdf Quote Link to comment Share on other sites More sharing options...
leowjunwei Posted January 13, 2006 Author Report Share Posted January 13, 2006 hi TonyI thank youur help in getting me started on pure logic for my keyboard converter project but i realize doing it in micro-controller way will need less effort as what u mentioned and the chip i am using it PIC16F84. i found a good website to get me started.It provides the final asm file and the schematic.I am not sure if you can help me with this.this is the link: h**p://www.technology.niagarac.on.ca/students/j/cjones/ i have problem understanding this section of code.How does the developer use 138 to generate baud rate of 1200? ********Main Program******************** receive the data at 1200 baud rate call Delay3 call Delay3 *******Delay3-used for RS232, provides a baud rate of 1200***** Delay3 movlw .138 movwf count3 dec3 decfsz count3,f goto dec3 return ******************************************************** please advise. thanks.. Quote Link to comment Share on other sites More sharing options...
Tony_Stoynov Posted January 14, 2006 Report Share Posted January 14, 2006 Hi,if you look at forums above, you wil see may post with C source for the 16F628 controller, i think this is a good solution, 16F84 not have a hardware RS and this may be a problem for you, because you not have a experience in to the uC. The ideais o generate fixed time delay, on 1200 b/ps you have avalible bit every 833 uS. After receiving the start bit, this must be connect to the interrupt input, B.0 for example, you start your time delay, for example, first generate 416, get first bit, after that wait 833 and get second, 833 third ...... but this is not the most good way to make a software RS, all is depend from CPU usage, if your CPU have a time, you can use frequency 10 or 20 time high, and use this frequency to read the data. This will give to you more flexability. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.