Menu

Examples Log in to Edit

Sample Applications

Here are some code samples that show how Ada can be used to program microcontrollers:

  • [SimpleIO]
  • [echo] an incoming character at the UART (RS232) interface
  • LCD send output to a 16x2 character LCD
  • Program memoryStoring large amount of data to flash memory

AVR Library

The typical built-in peripherals of the AVR microcontrollers are supported by the avrlib. We apply a typical coding style for these support packages. Application programs should have with and use clauses for the parent package AVR and have only with clauses and no use clauses for the support packages. That results in calls like UART.Init or Timer2.Stop.

Libraries

AVR-Ada also comes with some utility libraries

  • [OwireLib] library for searching and accessing Dallas' 1-Wire sensors and components
  • [Sensirion] library for accessing the Sensirion temperature and humidity sensors
  • [HD44780Lib] library for displaying information on text LCDs based on HD44780 controlers
  • [Debug] library for writing debug messages to the serial interface
  • [fatfs] library that implements FAT16/32 for SD/MMC cards
  • [CRC] libraries for generating CRC8 and CRC16 values
  • [slip] protocol library for packetized I/O over streams like asynchronous serial links
  • [MCP4922] SPI support for the MCP4922 DAC chip
  • [MIDI] MIDI support for any byte stream

Related

Wiki: ADC
Wiki: CRC
Wiki: Delays
Wiki: EEprom
Wiki: HD44780Lib
Wiki: Interrupts
Wiki: MCP4922
Wiki: MIDI
Wiki: Programspace
Wiki: SimpleIO
Wiki: Strings
Wiki: Timer
Wiki: UART