mathertel / DMXSerial

An Arduino library for sending and receiving DMX packets.
BSD 3-Clause "New" or "Revised" License
336 stars 79 forks source link

Added URSEL flag to fix ATMEGA8 functionality #84

Open aidancrowther opened 1 month ago

aidancrowther commented 1 month ago

As documented on page 150 of the ATMEGA8 datasheet, bit 7 of the UCSRC register must be set to 1 in order to write to register UCSRC; otherwise, writes are directed to register UBRRH. Adding a preprocessor macro to identify compilation for the ATMEGA8, and adding the required flag has resolved the issue of this library failing to execute in my case. I have only validated functionality for DMX read functionality at this time.