Difference between revisions of "AVR Embedded Tutorials"
From Free Pascal wiki
Jump to navigationJump to searchm (→Set up cross compiler/IDE: New update from German page) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
− | == AVR embedded | + | == AVR embedded tutorials == |
− | This is | + | This is an overview of tutorials for programming AVR microcontrollers with Free Pascal and Lazarus. This includes various ATtiny and ATmega microcontrollers. Most of the examples also run on an Arduino with an ATmega; especially the Uno/Nano. The Arduino-Mega can also be programmed. Basically, all AVR microcontrollers are programmed more or less the same way. Usually only the registers differ a little. |
== Set up cross compiler/IDE == | == Set up cross compiler/IDE == | ||
Line 11: | Line 11: | ||
* [[AVR Embedded Tutorial - Entry Lazarus and Arduino|Getting started Lazarus and Arduino (Uno/Nano)]] - How do I set up Lazarus to program an Arduino (AVR - Cross compiler). | * [[AVR Embedded Tutorial - Entry Lazarus and Arduino|Getting started Lazarus and Arduino (Uno/Nano)]] - How do I set up Lazarus to program an Arduino (AVR - Cross compiler). | ||
* [[AVR Embedded Tutorial - Set up Lazarus for ATmega and ATTiny|Set up Lazarus for ATtiny and ATmega]] - Lazarus cross compilation for additional Arduino/AVRs. | * [[AVR Embedded Tutorial - Set up Lazarus for ATmega and ATTiny|Set up Lazarus for ATtiny and ATmega]] - Lazarus cross compilation for additional Arduino/AVRs. | ||
− | * Tool for creating and modifying AVR/Arduino projects: [https://github.com/sechshelme/Lazarus-Embedded/tree/master/ | + | * Tool for creating and modifying AVR/Arduino projects: [https://github.com/sechshelme/Lazarus-Embedded/tree/master/Lazarus_Embedded_GUI_Package Embedded GUI Package] - sechshelme (external link). |
* [[AVR Embedded Tutorial - Various programmers|Various programmers]] - hardware connections to flash the AVR. | * [[AVR Embedded Tutorial - Various programmers|Various programmers]] - hardware connections to flash the AVR. | ||
Line 18: | Line 18: | ||
* [https://github.com/sechshelme/Lazarus-Embedded sechshelme examples] (external) | * [https://github.com/sechshelme/Lazarus-Embedded sechshelme examples] (external) | ||
* [https://github.com/ccrause/fpc-avr crrause examples] (external) | * [https://github.com/ccrause/fpc-avr crrause examples] (external) | ||
+ | |||
+ | == AVR tutorials == | ||
=== Software === | === Software === | ||
− | * [[AVR_Programming]] - | + | * [[AVR_Programming|AVR Programming]] - Important basics and special features for programming AVR. |
− | * [[AVR Embedded Tutorial - Library|Libraries]] - | + | * [[AVR Embedded Tutorial - Library|Libraries]] - Units in AVR programming. |
− | * [[AVR Embedded Tutorial - Delays|Delay]] - | + | * [[AVR Embedded Tutorial - Delays|Delay]] - Waiting routines (delay/sleep). |
* [[AVR Embedded Tutorial - Multiplex|Multiplex]] - Multiplex based on a 4-digit 7-segment display. | * [[AVR Embedded Tutorial - Multiplex|Multiplex]] - Multiplex based on a 4-digit 7-segment display. | ||
* [[AVR Embedded Tutorial - Int to digits|Integer to digits]] - Output an integer to digits (7-segment display). | * [[AVR Embedded Tutorial - Int to digits|Integer to digits]] - Output an integer to digits (7-segment display). | ||
Line 59: | Line 61: | ||
* [[AVR Programming]] - Important basics and special features for programming AVR Embedded/Arduino | * [[AVR Programming]] - Important basics and special features for programming AVR Embedded/Arduino | ||
* [[Arduino]] - Communication with an Arduino | * [[Arduino]] - Communication with an Arduino | ||
− | * [[ | + | * [[ARM Embedded Tutorials]] - Tutorials for ARM Embedded/STM32 and Raspberry Pi Pico/RP2040. |
[[Category:Operating Systems and Platforms]] | [[Category:Operating Systems and Platforms]] |
Latest revision as of 14:02, 20 September 2022
│ Deutsch (de) │ English (en) │
AVR embedded tutorials
This is an overview of tutorials for programming AVR microcontrollers with Free Pascal and Lazarus. This includes various ATtiny and ATmega microcontrollers. Most of the examples also run on an Arduino with an ATmega; especially the Uno/Nano. The Arduino-Mega can also be programmed. Basically, all AVR microcontrollers are programmed more or less the same way. Usually only the registers differ a little.
Set up cross compiler/IDE
Building the cross compiler and setting up the Lazarus IDE:
- Getting started Lazarus and Arduino (Uno/Nano) - How do I set up Lazarus to program an Arduino (AVR - Cross compiler).
- Set up Lazarus for ATtiny and ATmega - Lazarus cross compilation for additional Arduino/AVRs.
- Tool for creating and modifying AVR/Arduino projects: Embedded GUI Package - sechshelme (external link).
- Various programmers - hardware connections to flash the AVR.
AVR programming examples
- sechshelme examples (external)
- crrause examples (external)
AVR tutorials
Software
- AVR Programming - Important basics and special features for programming AVR.
- Libraries - Units in AVR programming.
- Delay - Waiting routines (delay/sleep).
- Multiplex - Multiplex based on a 4-digit 7-segment display.
- Integer to digits - Output an integer to digits (7-segment display).
- Random Number Generator - A random number generator is quite complex on an AVR.
Hardware
- GPIO - Out / In - How do I access the GPIO on the AVR?
- GPIO - Interrupt - Use of GPIO interrupts and pin change.
- Timers/Counters - Use of hardware timers.
- Analog Write/PWM - Analog output using pulse width modulation (PWM)
- Analog Read - Read the analog pin.
- EEPROM - Save and read data to/from an EEPROM.
Communication
- UART - Serial input and output via UART (COM port).
- SPI - Use of the hardware SPI interface with an ATmega328 / Arduino.
- SPI slave - Use SPI as a slave.
- I²C / TWI - Communication with I²C / TWI, hardware controlled.
- Software I²C/TWI - Communication with I²C / TWI, software controlled.
External modules
- Shift registers - How do I control shift registers?
- Control I²C EEPROM - I²C EEPROM (24LC256).
- I²C external clock - External clock module DS3231.
- SPI shift register - Control a 74HC595 shift register via SPI.
- Control SPI MCP4922 - Control 12-bit DAC MCP4922 via SPI.
- ADS1115 - Control the 16-bit converter ADC1115 via I²C.
See also
- AVR - Cross compiler with make
- AVR Programming - Important basics and special features for programming AVR Embedded/Arduino
- Arduino - Communication with an Arduino
- ARM Embedded Tutorials - Tutorials for ARM Embedded/STM32 and Raspberry Pi Pico/RP2040.