Jump to content
Electronics-Lab.com Community

RS232 to keyboard converter


Recommended Posts

  • 2 weeks later...

hi Tony

I 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..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...