Hello all, have anyone ever done BITBUS communication with AVR? Is it possible to do this using USART of ATMega? Please suggest
It looks an awful lot like I2C? Is there some reason not to simply use the TWI that the AVR already has?
Didn't you ask much the same question recently? At least you were upfront this time - it took a bit of probing to get the info from you last time. If I recall correctly, the conclusion was that the AVR could send it easily, reception was a bit trickier as you need to recover the clock.
Cliff - BITBUS is an old serial protocol - nothing like I2C, if fact it shares similar traits to USB in that it is synchronous and uses bit stuffing.
You recalled correct. At that time I was really confused with arduino library and HDLC and dragged the topic towards arduino. Now I am not going to opt arduino and the library. So specifically with ATMega I studied the timing diagram in the datasheet for both bitbus and MCU usart, and want suggestions if I am going right way if write USART code for bitbus? While receiving 0x7E start bit works same way as in normal serial?
P.S. I hope it is ok If I continue in this thread, otherwise I can continue in previous thread as well. Sorry for inconvenience.
Any suggestions please?
I doubt the usart will do it - firstly it is synchronous and you need to implement bit stuffing. As I said in #3 - transmission is easy, reception is much trickier. For reception, you need to implement a method of recovering the clock - a DPLL is normally used for this. You can implement a DPLL in hardware or software if your processor is fast enough - unfortunately, the poor AVR might be hard pressed. The BITBUS bit time is 4us - you need to do a bit of processing for each bit.
faster cpu with counter/compare feature on the timers (just about all micros have this).
maybe a PSOC5 as this micro has some programmable logic that you could most likely implement the BITBUS serial engine with
or use the 85C30 which is bulky and old skool.
... - unfortunately, the poor AVR might be hard pressed.
E5's XCL doing 2Mbps(!!!) FSK, appnote to follow | AVR Freaks
"Dare to be naïve." - Buckminster Fuller
© 2019 Microchip Technology Inc.