simulavr  1.1.0
atmega1284abase.h
Go to the documentation of this file.
1  /*
2  ****************************************************************************
3  *
4  * simulavr - A simulator for the Atmel AVR family of microcontrollers.
5  * Copyright (C) 2001, 2002, 2003 Klaus Rudolph
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  ****************************************************************************
22  */
23 #ifndef ATMEGA124ABASE_INCLUDED
24 #define ATMEGA124ABASE_INCLUDED
25 
26 #include "avrdevice.h"
27 #include "hardware.h"
28 #include "rwmem.h"
29 #include "externalirq.h"
30 #include "hwuart.h"
31 #include "hwad.h"
32 #include "hwacomp.h"
33 #include "hwport.h"
34 #include "hwspi.h"
35 #include "hwtimer/timerprescaler.h"
36 #include "hwtimer/hwtimer.h"
37 
38 #include "ioregs.h" // only for rampz
39 
45 
46 protected:
71  HWAd* ad;
88 
89 public:
90  AvrDevice_atmega1284Abase(unsigned ram_bytes, unsigned flash_bytes,
91  unsigned ee_bytes, unsigned nrww_start);
93 };
94 
96 public:
97  AvrDevice_atmega1284A() : AvrDevice_atmega1284Abase(16 * 1024, 128 * 1024, 4 * 1024, 0xf000) {}
98 };
99 
101 public:
102  AvrDevice_atmega644A() : AvrDevice_atmega1284Abase(4 * 1024, 64 * 1024, 2 * 1024, 0x7000) {}
103 };
104 
106 public:
107  AvrDevice_atmega324A() : AvrDevice_atmega1284Abase(2 * 1024, 32 * 1024, 1 * 1024, 0x3800) {}
108 };
109 
111 public:
112  AvrDevice_atmega164A() : AvrDevice_atmega1284Abase(1 * 1024, 16 * 1024, 512, 0x1c00) {}
113 };
114 
115 #endif
IOSpecialReg * pcifr_reg
PCIFR IO register.
Basic AVR device, contains the core functionality.
Definition: avrdevice.h:66
PrescalerMultiplexerExt premux0
prescaler multiplexer for timer 0
IOSpecialReg * eicra_reg
EICRA IO register.
Definition: hwad.h:90
Extends HWPrescaler with a external clock oszillator pin.
ICaptureSource * inputCapture1
input capture source for timer1
HWAcomp * acomp
analog compare unit
ExternalIRQHandler * extirqpc
external interrupt support for PCINT[0-2]
OSCCALRegister * osccal_reg
OSCCAL IO register.
HWTimer16_2C3 * timer1
timer 1 unit
Implement CLKPR register.
Definition: rwmem.h:135
TimerIRQRegister * timerIrq1
timer interrupt unit for timer 1
Defines a Port, e.g. a hardware device for GPIO.
Definition: hwport.h:43
IOSpecialReg * pcmsk1_reg
PCIMSK1 IO register.
IOSpecialReg * pcmsk3_reg
PCIMSK3 IO register.
HWARef * aref
adc reference unit
A register in IO register space unrelated to any peripheral. "GPIORx" in datasheets.
Definition: rwmem.h:113
IOSpecialReg * eimsk_reg
EIMSK IO register.
GPIORegister * gpior1_reg
general purpose IO register
Handler for external IRQ's to communicate with IRQ system and mask/flag registers.
Definition: externalirq.h:41
HWPrescalerAsync prescaler2
prescaler unit for timer 2
Implements the I/O hardware necessary to do USART transfers.
Definition: hwuart.h:149
GPIORegister * gpior2_reg
general purpose IO register
Timer unit with 16Bit counter and 2 output compare units, but 3 config registers. ...
Definition: hwtimer.h:593
AvrDevice_atmega1284Abase(unsigned ram_bytes, unsigned flash_bytes, unsigned ee_bytes, unsigned nrww_start)
Reference source for ADC (base class)
Definition: hwad.h:35
IOSpecialReg * pcicr_reg
PCICR IO register.
TimerIRQRegister * timerIrq2
timer interrupt unit for timer 2
HWAdmux * admux
adc multiplexer unit
PrescalerMultiplexer premux2
prescaler multiplexer for timer 2
TimerIRQRegister * timerIrq0
timer interrupt unit for timer 0
HWUsart * usart0
usart 0 unit
Provices flag and mask register for timer interrupts and connects irq lines to irqsystem.
Definition: timerirq.h:61
HWPrescaler prescaler01
prescaler unit for timer 0 and 1
IOSpecialReg gtccr_reg
GTCCR IO register.
Definition: hwspi.h:38
Prescaler unit for support timers with clock.
IOSpecialReg * pcmsk0_reg
PCIMSK0 IO register.
HWTimer8_2C * timer0
timer 0 unit
CLKPRRegister * clkpr_reg
CLKPR IO register.
PrescalerMultiplexer without external count pin.
Definition: prescalermux.h:35
Class, which provides input capture source for 16bit timers.
Definition: icapturesrc.h:34
HWUsart * usart1
usart 1 unit
PrescalerMultiplexerExt premux1
prescaler multiplexer for timer 1
Timer unit with 8Bit counter and 2 output compare unit.
Definition: hwtimer.h:416
ExternalIRQHandler * extirq012
external interrupt support for INT0, INT1, INT2
Definition: hwad.h:204
HWTimer8_2C * timer2
timer 2 unit
PrescalerMultiplexer with external count pin.
Definition: prescalermux.h:55
IOSpecialReg * eifr_reg
EIFR IO register.
GPIORegister * gpior0_reg
general purpose IO register
IOSpecialReg assr_reg
ASSR IO register.
Analog comparator peripheral.
Definition: hwacomp.h:42
Implement OSCCAL register.
Definition: rwmem.h:174
IOSpecialReg * pcmsk2_reg
PCIMSK2 IO register.