Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INT d = 0x41
- FLOAT INTERVAL = 1000m
- FLOAT FREQ = 9600
- FLOAT BITTIME = 1/FREQ
- INT j
- START:
- OUT = 1
- SLEEP FOR INTERVAL
- // Start bit
- OUT = 0
- SLEEP FOR BITTIME
- // Data bits
- FOR j = 0 TO 7
- OUT = d & (1 << j)
- SLEEP FOR BITTIME
- NEXT j
- // Stop bit
- OUT = 1
- SLEEP FOR BITTIME
- GOTO START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement