I got the I2C/TWI interface working as master and slave simultaneously, so finished that chapter. I didn’t add the non-blocking functions but explain how to easily modify the code to achieve it. Turns out there is a comment in the source explicitly mentioning that Arduino likes blocking functions and the comment is on the statement …
Month: July 2020
It’s been a great past few days for progress on the book. I decided to tackle the Configurable Custom Logic. While I’m familiar with logic and FPGAs, I’ve never had a microcontroller with this feature before. I needed to study what it could do and come up with some reasonable example programs. Frankly, it doesn’t …
All of the USART examples are done but for RS-485. I originally was going to skip this since it is so similar to “1-wire” operation, but then decided to buy some RS-485 drivers and give complete USART coverage with examples. This chapter should be finished by the end of next week after the parts arrive. …
The USARTs have lots of flexibility, so how do I present it? I’ve been mulling over it and decided to do one basic example program and then vary the protocol for additional examples. I’ll be using two of the USARTs to communicate with each other. One, call it the primary USART, will send a string …
This coming week I’ll either do the USART or TWI. I haven’t decided which. If it goes well (no problems) I might get both finished. I finished the SPI. The SPI slave implementation was interesting. I ended up with three slave examples. The slave examples do need a master. As I said in the last …
This is the week I’m determined to cover the SPI interface. In the process of testing I uncovered an error in the ATmega4809 documentation. The documentation states for the IF Receive Complete Interrupt Flag, “IF is cleared by hardware when executing the corresponding interrupt vector.” This is not true. The flag must be manually cleared …
I performed surgery on the Arduino Library. Yes, it is a risky task. I had to modify five source files, but the changes are conditionally compiled. I had previously added another “board” that is the Arduino Nano Every with a 20MHz clock so I could easily select it. Now I’ve gotten rid of the ATMEGA328 …
The Arduino Nano Every does its best to mimic the operation of the Arduino Nano even to the point of making it difficult to obtain the best performance of the part. I’ve just been pulling my hairs over this and how they handled the Timer/Counters. The ATmega4809 has two types of Timer/Counters, “A” and “B”. …