Subject:
|
serial output
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Wed, 16 Feb 2000 11:07:02 GMT
|
Original-From:
|
E158 (M.FAZAL) <M.FAZAL@bham-eee-fs4.bham.ac.=ihatespam=uk>
|
Viewed:
|
1020 times
|
| |
| |
hi
i want to send a byte as a series of bit to a transamitter module i am
using. the FAQ says i can use the digital 9, or SPI port or TOC3. i can
output to these ports.
the first problem is getting the delay times between bits. if i use the
msleep() function i can get up to 1000 baud right? but i want to use a
standard bitrate 1200baud. since argument to msleep() is an integer how can
i do this?
the other question is in the code i have to write separate lines that sets
and clears the output with respect to the byte. for example i used the ode
as below using the TOC3 output.
.
.
bit_set(0x1000, 0x20); /* mark*/
msleep(9l); for bit rate of 110baud
bit_set(0x1000, 0x20);
msleep(9l);
bit_set(0x1000, 0x20);
msleep(9l);
.
.
is there an easier way of doing this?
many thanks
M Fazal
|
|
Message has 1 Reply: | | Re: serial output
|
| you're not going to be able to generate accurate bit times using Interactive C -- it'd have to be an assembly language driver. use the 9600 baud output driver located at (URL) your message you said: (...) (25 years ago, 16-Feb-00, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|