AVR
AVR
Projects with ATmega.. MCU's
Several sample projects with JSDL and
ATmega??
controllers,
realised with Atmel Evaluationboard 2.0
and
Add-On Board 1.0 from Pollin.
My development environment consists of:
- JSDL 1.3.0
- SDL Kernel 1.2.0
- Eclipse 'Ganymede', with Plug-ins for WinAVR and AVRdude (Programmer)
- Subversion (with VisualSVN as server)
- WinAVR: gcc Cross-Compiler, AVRdude, etc.
JSDL_example
A simple example using the two keys TASTER1 and TASTER2, two LEDs LED1 and LED2 on the Evaluation Board and the 2 line LCD on the Add-On Board. As controller serves a ATmega8 with 16 MHz clock. The LCD module is connected using a 4-bit wide interface:
LCD | MCU ATmega8 |
Eval. Board 40 pin J4 |
Addon Board Pin name |
---|---|---|---|
D0 | PC0 | 1 | PA1 |
D1 | PC1 | 2 | PA2 |
D2 | PC2 | 3 | PA3 |
D3 | PC3 | 4 | PA4 |
E | PB2 | 13 | PB3 |
R/W | PB1 | 12 | PB4 |
RS | PB0 | 11 | PB5 |
The program toggles LED1 every 2 seconds (using a SDL timer), LED2 is turned on with TASTER1 and turned off with TASTER2. Two lines of text are displayed on the LCD. Not much, but suitable as a basis for own applications and demonstrating the use of the JSDL-tool and the basic principles of the HAL (Hardware Abstraction Layers), see also AVR Project description.
(The SDL project also contains enlargements for the next sample project 'DCF_clock', like for example the process names (DCFclock) or the signals DCF_SIG or DCF_REQ, which are not used here).
Download
The .zip archive also contains the C-code generated by JSDL. The makefile in (jdsl\example\makefile) is generated by JSDL for MS Visual C++ (for the host simulation). Currently there's no makefile for cross-compiling the target software, this is done from inside the Eclipse project.
- Download JSDL_example
The directory structure after extracting to e.g. 'JSDL_example':
C-Code of the HAL and general functions (*.[ch])
|
Name of the JSDL-project
|
SDL files of the project (*.sdl, *.pcs)
C-Code generated by JSDL (*.[ch])
SDL run-time system (jsdlkern.c, kernel_if.h)
JSDL_dcf_clock
Not yet ready!
Download
Not yet ready!
- Download JSDL_dcf_clock
Last update 16.11.2008 18:52:36