simulavr  1.1.0
attiny25_45_85.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 ATTINY25
27 #define ATTINY25
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 "hwad.h"
38 #include "hwacomp.h"
39 #include "hwusi.h"
40 
43 
44  public:
46 
57 
63 
66 
69  HWAd *ad;
72 
77  AvrDevice_attinyX5(unsigned ram_bytes,
78  unsigned flash_bytes,
79  unsigned ee_bytes);
81 };
82 
85  public:
87  AvrDevice_attiny25() : AvrDevice_attinyX5(128, 2 * 1024, 128) {}
88 };
89 
92  public:
94  AvrDevice_attiny45() : AvrDevice_attinyX5(256, 4 * 1024, 256) {}
95 };
96 
99  public:
101  AvrDevice_attiny85() : AvrDevice_attinyX5(512, 8 * 1024, 512) {}
102 };
103 
104 #endif
105 
AvrDevice_attiny45()
Creates the device for ATTiny45, see AvrDevice_attinyX5.
Basic AVR device, contains the core functionality.
Definition: avrdevice.h:66
IOSpecialReg gtccr_reg
GTCCR IO register.
Definition: hwad.h:90
PrescalerMultiplexerExt premux0
prescaler multiplexer for timer 0
IOSpecialReg * mcucr_reg
MCUCR IO register.
OSCCALRegister * osccal_reg
OSCCAL IO register.
Implement CLKPR register.
Definition: rwmem.h:135
Defines a Port, e.g. a hardware device for GPIO.
Definition: hwport.h:43
HWUSI_BR * usi
usi unit
GPIORegister * gpior2_reg
GPIOR2 Register.
A register in IO register space unrelated to any peripheral. "GPIORx" in datasheets.
Definition: rwmem.h:113
TimerIRQRegister * timer01irq
timer interrupt unit for timer 0 and 1
Handler for external IRQ's to communicate with IRQ system and mask/flag registers.
Definition: externalirq.h:41
GPIORegister * gpior1_reg
GPIOR1 Register.
HWARef * aref
adc reference unit
IOSpecialReg * pllcsr_reg
PLLCSR IO register.
HWTimerTinyX5 * timer1
timer 1 unit
HWPrescaler prescaler0
prescaler unit for timer 0 (10 bit w. reset/sync and only sys clock)
AVR device class for ATTiny45, see AvrDevice_attinyX5.
timer unit for timer 1 on ATtiny25/45/85
Definition: hwtimer.h:778
Reference source for ADC (base class)
Definition: hwad.h:35
HWPort portb
port B (only 6 bit)
HWAcomp * acomp
analog compare unit
ExternalIRQHandler * extirq
external interrupt support
AvrDevice_attinyX5(unsigned ram_bytes, unsigned flash_bytes, unsigned ee_bytes)
AVR device class for ATTiny25, see AvrDevice_attinyX5.
IOSpecialReg * pcmsk_reg
PCMSK IO register.
Provices flag and mask register for timer interrupts and connects irq lines to irqsystem.
Definition: timerirq.h:61
HWTimer8_2C * timer0
timer 0 unit
HWAdmux * admux
adc multiplexer unit
AvrDevice_attiny25()
Creates the device for ATTiny25, see AvrDevice_attinyX5.
AVR device class for ATTiny85, see AvrDevice_attinyX5.
AVRDevice class for ATTiny25/45/85.
AvrDevice_attiny85()
Creates the device for ATTiny85, see AvrDevice_attinyX5.
Prescaler unit for support timers with clock.
HWAd * ad
adc unit
IOSpecialReg * gifr_reg
GIFR IO register.
Timer unit with 8Bit counter and 2 output compare unit.
Definition: hwtimer.h:416
Definition: hwad.h:204
CLKPRRegister * clkpr_reg
CLKPR IO register.
PrescalerMultiplexer with external count pin.
Definition: prescalermux.h:55
Analog comparator peripheral.
Definition: hwacomp.h:42
Implement OSCCAL register.
Definition: rwmem.h:174
IOSpecialReg * gimsk_reg
GIMSK IO register.
GPIORegister * gpior0_reg
GPIOR0 Register.