Thursday, December 3, 2015

Wednesday, December 2, 2015

Rewriting a bare millis() clock on an AVR without the Arduino environment

This is a short stand-alone C source code that I wrote to simulate the Arduino millis() function on an Atmel AVR 328p microcontroller. It is part of a growing collection of AVR routines.


AVR 328p minimalist serial read/write source code

This is a C source code I wrote to do serial read/write on an Atmel AVR 328p microcontroller.
This is the same processor as the Arduino Uno for example. It is part of a growing collection of AVR routines.

And since you can set your own limits, you can use this code in place of the usual Serial class, as the default buffers are quite small and they may overflow if you are not processing them fast enough, or if you are sending too much data at once (eg. file copy/paste). Note that some terminals let you set add a small delay automatically after each line is sent, which is the way to go so as to leave enough time for your program to process the incoming flow.