simulavr  1.1.0
atmega128.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  * $Id$
24  */
25 
26 #ifndef ATMEGA128
27 #define ATMEGA128
28 
29 #include "avrdevice.h"
30 #include "hardware.h"
31 #include "rwmem.h"
32 #include "hwtimer/timerprescaler.h"
33 #include "hwtimer/timerirq.h"
34 #include "hwtimer/hwtimer.h"
35 #include "externalirq.h"
36 #include "hwuart.h"
37 #include "hwspi.h"
38 #include "hwad.h"
39 #include "hwacomp.h"
40 #include "pin.h"
41 
42 #include "ioregs.h" //only for rampz here
43 
46 
47  public:
62 
65  HWAd *ad;
67 
87 
88  AvrDevice_atmega128base(unsigned flash_bytes, unsigned ee_bytes, unsigned ext_bytes, unsigned nrww_start);
90 };
91 
94  public:
96  AvrDevice_atmega64() : AvrDevice_atmega128base(64 * 1024, 2 * 1024, 0, 0x7000) {}
97 };
98 
101  public:
103  AvrDevice_atmega128() : AvrDevice_atmega128base(128 * 1024, 4 * 1024, 0xef00, 0xf000) {}
104 };
105 
106 #endif
Basic AVR device, contains the core functionality.
Definition: avrdevice.h:66
Definition: hwad.h:90
Extends HWPrescaler with a external clock oszillator pin.
AVR device class for ATMega64, see AvrDevice_atmega128base.
Definition: atmega128.h:93
PrescalerMultiplexerExt premux1
prescale multiplexer for timer1
Definition: atmega128.h:73
IOSpecialReg * eifr_reg
EIFR IO register.
Definition: atmega128.h:59
PrescalerMultiplexer premux0
prescale multiplexer for timer0
Definition: atmega128.h:72
ExternalIRQHandler * extirq
external interrupt support
Definition: atmega128.h:55
HWPort portd
port D
Definition: atmega128.h:51
HWPort portc
port C
Definition: atmega128.h:50
HWTimer8_1C * timer2
timer 2 unit
Definition: atmega128.h:80
Timer unit with 8Bit counter and one output compare unit.
Definition: hwtimer.h:377
Defines a Port, e.g. a hardware device for GPIO.
Definition: hwport.h:43
ICaptureSource inputCapture1
input capture source for timer1
Definition: atmega128.h:76
IOSpecialReg * eicra_reg
EICRA IO register.
Definition: atmega128.h:56
Handler for external IRQ's to communicate with IRQ system and mask/flag registers.
Definition: externalirq.h:41
TimerIRQRegister * timer3irq
timer interrupt unit for timer 3
Definition: atmega128.h:83
HWAd * ad
adc unit
Definition: atmega128.h:65
OSCCALRegister * osccal_reg
OSCCAL IO register.
Definition: atmega128.h:61
AVRDevice class for ATMega64 and ATMega128.
Definition: atmega128.h:45
HWTimer8_1C * timer0
timer 0 unit
Definition: atmega128.h:78
ICaptureSource inputCapture3
input capture source for timer3
Definition: atmega128.h:77
AvrDevice_atmega128base(unsigned flash_bytes, unsigned ee_bytes, unsigned ext_bytes, unsigned nrww_start)
Definition: atmega128.cpp:71
Implements the I/O hardware necessary to do USART transfers.
Definition: hwuart.h:149
Implement XDIV register.
Definition: rwmem.h:156
IOSpecialReg sfior_reg
SFIOR IO register.
Definition: atmega128.h:69
XDIVRegister * xdiv_reg
XDIV IO register.
Definition: atmega128.h:60
HWUsart * usart0
usart 0 unit
Definition: atmega128.h:85
PrescalerMultiplexerExt premux3
prescale multiplexer for timer3
Definition: atmega128.h:75
HWPort portf
port F
Definition: atmega128.h:53
Reference source for ADC (base class)
Definition: hwad.h:35
HWARef * aref
adc reference unit
Definition: atmega128.h:64
IOSpecialReg * eimsk_reg
EIMSK IO register.
Definition: atmega128.h:58
HWUsart * usart1
usart 1 unit
Definition: atmega128.h:86
Timer unit with 16Bit counter and 3 output compare units.
Definition: hwtimer.h:656
HWPort portb
port B
Definition: atmega128.h:49
Provices flag and mask register for timer interrupts and connects irq lines to irqsystem.
Definition: timerirq.h:61
HWPort porte
port E
Definition: atmega128.h:52
AVR device class for ATMega128, see AvrDevice_atmega128base.
Definition: atmega128.h:100
Definition: hwspi.h:38
AvrDevice_atmega64()
Creates the device for ATMega64, see AvrDevice_atmega128base.
Definition: atmega128.h:96
PrescalerMultiplexerExt premux2
prescale multiplexer for timer2
Definition: atmega128.h:74
TimerIRQRegister * timer012irq
timer interrupt unit for timer 0 to 2
Definition: atmega128.h:82
Prescaler unit for support timers with clock.
AvrDevice_atmega128()
Creates the device for ATMega128, see AvrDevice_atmega128base.
Definition: atmega128.h:103
PrescalerMultiplexer without external count pin.
Definition: prescalermux.h:35
HWPort portg
port G
Definition: atmega128.h:54
HWTimer16_3C * timer1
timer 1 unit
Definition: atmega128.h:79
HWPort porta
port A
Definition: atmega128.h:48
Class, which provides input capture source for 16bit timers.
Definition: icapturesrc.h:34
IOSpecialReg * eicrb_reg
EICRB IO register.
Definition: atmega128.h:57
Definition: hwad.h:204
IOSpecialReg assr_reg
ASSR IO register.
Definition: atmega128.h:68
HWSpi * spi
spi unit
Definition: atmega128.h:84
HWAdmux * admux
adc multiplexer unit
Definition: atmega128.h:63
HWTimer16_3C * timer3
timer 3 unit
Definition: atmega128.h:81
PrescalerMultiplexer with external count pin.
Definition: prescalermux.h:55
Analog comparator peripheral.
Definition: hwacomp.h:42
Implement OSCCAL register.
Definition: rwmem.h:174
HWPrescaler prescaler123
prescaler unit for timer 1 to 3
Definition: atmega128.h:71
HWAcomp * acomp
analog compare unit
Definition: atmega128.h:66
HWPrescalerAsync prescaler0
prescaler unit for timer 0
Definition: atmega128.h:70