# Procyon AVRlib Release Notes

Written by Pascal Stang | Updated:

3/12/2005

- Fixed AVRlib to comply to new WinAVR package (avr-libc has dropped several methods that were depricated causing the old AVRlib to fail to compile). Sorry about the delay. Please note that I've changed small parts of dozens of files. I may have introduced bugs that I haven't yet detected. Your feedback welcome.

1/30/2005

- Added new lis3l02 accelerometer library. This ST accelerometer incorporates a 3-axis sensor and A/D converter in one 28-pin SOIC package with I2C and SPI bus. Unfortunately, the production future of the digital version of this accelerometer is unknown.
- Added new extint external interrupt library. The library is not complete, but does work nicely for some processors. It is primarily designed to do two things:
  - abstract AVR external interrupts so that programs which use them can more easily cross-compile between different processors
  - allow novice (and even advanced) users to be able to use external interrupts without looking up a bunch of register and bit defines in the datasheets.
- Revised GPS library to standardize on units used for latitude/longitude angles
- Improved NMEA library. Packet processing function now returns type of packet decoded. Packet parsers reject valid but empty packets.
- MMC library has proper #defines to turn on/off debugging statements
- uartsw and uartsw2 libraries now support optional inversion of serial signal via #define in conf file

10/15/2004

- Added new spieeprom library. Not quite sure if it works properly.

9/25/2004

- Added a simple MultiMedia Card / SecureDigital Card interface library. The library allows you to read and write sector-sized (512 byte) data chunks. Please see mmc.h for information about how to connect the card to the microcontroller.
- Added uartGetByte() functions to uart.c and uart2.c. These functions emulate the typical getchar() function and return a received character if available, otherwise -1.
- Fixed bug causing incorrect I2C bus speed.

6/25/2004

- Changed encoder library to new read-in scheme which is more technically correct and resistant to error. New scheme counts both rising and falling edges of PHASEA, so be prepared for twice the precision (you'll get double the usual number of counts per revolution).
- Added timer functions to exploit arbitrary frequency/precision PWM in new AVR processors
- Fixed timerPause() precision management bug in Timer/Timer128 libraries.
  TimerPause function should now work correctly for longer delays
- Added timerXGetPrescaler() functions to timer libraries to avoid code maintenance issues and to reduce overall code size
- Fixed bug in Pulse library that cause wildly incorrect frequencies to be produced

5/04/2004

- Added MegaIO directory with simple routines for accessing the MegaIO peripheral expander. MegaIO allows you to use a slave AVR processor as a peripheral expander and control it easily from a master AVR processor over the I2C bus. This gives your master processor easy access to: an extra buffered UART, extra PWM outputs, extra A/D inputs, extra I/O lines, extra RAM, and more.

2/27/2004

- Improved original Software UART library (uartsw: uses Timer1 OC1A OC1B and IC1)
- Added new Software UART library (uartsw2: uses Timer0 and Timer2 and INT2)
- Fixed small but catastrophic bug in the Software Memory Bus (sramsw)
- Fixed small but catastrophic bug in the Timer library when using Timer 0 Output Compare
- Fixed Timer128 library bug when using Timer 3 Output Compare B
- Added support for ICR top-count PWM when supported by processor
- Thanks to all the users who have offered bugfixes and feedback!

2/22/2004

- Added ADS7828 I2C A/D Converter Library + example code
- Added DS1631 I2C Temperature Sensor Library + example code
- Timer/Timer128 Library

1. For processor that support it, timerPause() will sleep the processor during the delay time, thereby reducing power consumption. All interrupts are still active so hopefully this shouldn't break anybody's code.
2. The timer library will now compile properly for the processors with only timers 0,1 (by excluding timer2 functions automatically)
3. Bugfix on Timer3 initialization
4. A big thanks to those that wrote in to report bugs or offer suggestions for improvement!

- Servo Library: optimized slightly
- UART/UART2 Library: Improved compile compatibility across more AVR processors

9/15/2003

- I2C Library
  1. A few bugfixes here. i2cMasterSend and i2cMasterReceive finally return error values if the target device is not present. This is especially important in the case of receive because that would otherwise hang. Some debugging has been added to the I2C interrupt state machine. Debugging can be turned on via #define but needs to be customized based on the processor in use.

7/23/2003

- Cmdline Library (NEW)
  1. This library is a complete fairly-easy-to-use command line interface complete with advanced line editing and history buffer. You add the commands and the functions to run for those commands. The arguments passed to your commands are available as strings or interpreted as decimal or hex integers.
- Uart/Uart2 Library
  1. Added a new method uartAddToTxBuffer() which adds one character at a time to the uart transmit buffer. The function can be used the the same way as uartSendByte, but writes only to the buffer. This is helpful for printf-ing inside interrupts or time-critical sections.
- i2ceeprom function library
  1. Fixed a compile bug that escaped last time.
  2. Bugfix: there was an endian-ness discrepancy between the read and write byte routines for the eeprom. Problem has been fixed thanks to feedback from users.

7/12/2003

- General Note
  1. CAUTION: The makefile and build process for AVRlib has changed to make installation and management simpler. You will need to define an AVRLIB environment variable to point to the location where you keep AVRlib. See the revised installation guide for more details.
  2. I made a lot of small fixes to various libraries without properly recording the changes. Sorry.
- STX/ETX function library
  1. The receiving packet engine has been revised for the stx/etx protocol. It's somewhat less stupidly coded now and should perform better. Fixed a bug that made servicing an empty receive buffer excessively long.
- Timer/Timer128 function library
  1. Since the creation of the timer library, the timerPause function had a bug/deficiency which caused it to be either slightly or grossly off in timing depending on the delay requested and the current prescaler setting. This bug is now fixed at the expense of a little extra code and timing performance should be considerably more accurate.

6/06/2003

- General Note
  1. I've recently seen the need for more project-dependent configurable settings in the core AVRlib libraries (uart, timer, rprintf). Rather than creating a smorgasboard of new "conf" files to handle the settings, I've decided to handle most things via #ifdefs and user-optional #defines. My feeling is that for core libraries, it nice to not have to lug around "conf" files all the time. We'll see how it goes...
- UART and UART2 function libraries
  1. You can now override the default UART receive handling (placing of the data into the receive buffer), by using the uartSetRxHandler() function and providing your own function.
  2. You can now adjust the default size of the UART Rx/Tx buffers by #defining the size before including uart.h. I recommend placing such #defines in your global.h.
- UARTSW function library
  1. Out of personal need, I have finally gotten the software-driven UART code working. Please consider this an alpha release. It works well, but the library is still in flux.
- A2D function library
  1. Efforts are being made to make the A2D functions compatible (compile transparently) over a greater range of AVR processors including the new Mega8,16,32,64. Please be patient if proper support for your processor is temporarily broken.
- Timer/Timer128 function library
  1. #defines have been added to specify the timer prescaler rates on RealTimeClock-equipped timer. You may have noticed that the RTC-equipped timer always has a different prescaler selection range than the other timers. You must use the new TIMERRTC_CLK_DIV defines instead of the TIMER_CLK_DIV defines on these timers, otherwise you will get wrong results.
  2. You can now change the default interrupt handler type (INTERRUPT vs. SIGNAL) used for the timers by #defining it before including timer.h. I recommend placing such #defines in your global.h.

5/29/2003

- Pulse function library
  1. There are two new functions PulseT1AStop() and PulseT1BStop(), that allow the stopping of pulse output regardless of the previously programmed number of pulses to be output. The new stop commands are crucial when using the continuous pulse output mode.

5/1/2003

- KS0108 Graphic LCD driver library
  1. Made some improvements to the code structure and #define names, eliminates some unnecessary lines.
  2. Implemented untested support for up to 4 controller chips (240x64 pixel display).
- rprintf library
  1. Thanks to some feedback, and some testing, I recently realized I had doubled the compiled size of the printf library when I added a floating-point print function a several months ago.
  2. The floating-point print can now be enabled or disabled in the rprintfconf.h file. (it is disabled by default)

4/30/2003

- Uart function library
  1. Like the timer library, you can now universally switch from SIGNAL-type interrupt handlers to INTERRUPT-type handlers by changing a #define in uart.h or uart2.h. Note, for the time being, I'm avoiding creating a "conf" file for the uart libraries because of their widespread use. Don't want to confuse users any mor than I have to.
- Pulse function library

1. Fixed a major bug which caused some pulse output requests to idle until the timer overflowed

- ATA/IDE interface driver

1. Brought this code out of basic disrepair and into service again - effort will continue as time permits

- FAT filesystem driver
  1. Brought this code out of basic disrepair and into service again - effort will continue as time permits
  2. Will attempt to improve the overall interface for FAT as well as begin to support file writing

3/13/2003

- New "debug" function library
  1. Added a new library for general functions useful when debugging. Currently the only available function is for nicely formatted hex/ascii table dumps (useful when inspecting memory or buffers).

3/2/2003

- I2C Library
  1. Continued updating of I2C library - NOTE: some old functions have changed names slightly to clarify their purpose and relationship to new functions.
  2. Added two function pointers designed to be set by the user to handle incoming Slave Receive and Slave Transmit operations.
  3. Added i2cMasterTransfer function which does the common write-then-read operation with repeated start in between so control of the bus is not lost. This kind of access is common when accessing memories or register based devices where the address must be written before reading back a value.
  4. NOTE: Structure of the library continues to change but has solidified substantially.

2/24/2003

- Encoder Library
  1. Improved interrupt flexibility and processor compatibility for this library
  2. Unfortunately, the complexity comes at the cost of a somewhat more complicated encoderconf.h which the user must edit to suit their specific needs on a per-project basis.
- I2C Library
  1. Second major revision of I2C library in an attempt to make it general enough to use for any common I2C operations.
  2. Changes include the "functionalizing" of basic low-level I2C operations such as generate start,stop, and send address/data.
  3. NOTE: Structure of the library has changed somewhat and will likely continue to be refined.
- Timer128 Library
  1. Added missing PWM on and off functions in Timer128 library

2/24/2003

- Release Notes Started

Written by Pascal Stang | Updated: