I am using a motorola 68HC912 board. I would like to use an output pin to simulate a serial output, just like the ones used in a RS232 port.
Could you please advice me on how I can do it? Thank you.
Zeit,
Sorry I'm new to assembly.
would you mind telling me what a UART is?
I was thinking of assigning a logic 1 or 0 to the output pin for a period of time. However, as I test the output voltage, a "1" gives a +5V and a "0" gives 0V.
I looked up the 232 signal definition, a logic "1" should be -3V to -25V and vice versa for "0".
I really have no idea on what I could do.
A UART is a Universal Asynchronous Receiver Transmitter.
In other words, the normal serial port hardware.
Many microcontrollers have a UART of some description built into them, which makes serial communications a good deal easier.
What you are describing is termed "bit banging", a method of programming a microcontroller to produce a serial output without using built in hardware.
The output of a microcontroller port pin is normally 0V or 5V (assuming that the microcontroller is running off a 5V rail).
This is normally fed into an RS232 interface chip like the MAX232 to produce the required +/-10V or so for the outside world.
What is the precise part number of the 68hc912 part that you are using?
If you tell us that, we can look on the Motorola website & download the datasheets etc.
Dear Zeit,
Yes I understand what you mean. There is a serial port in the board.
my board is 68HC912B32. In my project, I have to receive signals from PC and send signals to a servo control board. Both of them need a RS232 port. So I have to connect this port to the pc and simulate an output to the servo control board.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.