Controller Module ATMega128

The main module of the HomeLab is a controller development board (controller board) equipped with the AVR ATmega128 microcontroller. In addition to the microcontroller, the board consists of several peripherals, voltage stabilizer, connectors, etc. The controller board has the following features:

  • Atmega128-16AU microcontroller in the TQFP64 package (ROHS)
    • 8-channel 10-bit A/D converter
    • 128kB Flash memory (program memory)
    • 4kB EEPROM memory (data memory)
    • 6 channel programmable PWM
  • Standard 6-pin In system programming interface (ISP) connector
  • 14,7456 MHz clock (can be changed very easily, crystal is mounted on small 2-pin socket)
  • Real Time clock (RTC)
  • Reset protection circuitry for the ATmega128
  • Status LED and Power LED
  • Standard DB-9 serial port connector with RS232 transmitter / receiver
  • All Atmega signals available on three connectors (1. D, B, E ports, 2. G, C, A ports, 3. F port with ADC I/O lines)
  • Reset button
  • JTAG 10-pin Interface connector
  • 2-pin on/of connector – can be used for connecting on/off button
  • DC 2.1mm power connector
  • Built-in voltage stabilizer
Controller module

Module is equipped with AC/DC rectifier circuit and LDO voltage stabilizer (with low dropout) - external feeder with voltage stabilization is not needed.

Module can be powered just from step down transformer with output voltage greater than 6 volts and lower than 15 volts. Module has a wrong-polarization protection circuit (Greatz bridge). POWER LED signalizes connected feed (“POWER” description on the board).

Circuit can be equipped with external power switch by connecting it to S2 2-pin on/off connector. If external power switch is not used, S2 2-pin on/off connector must be shorted.

All ATmega128 signals are available on three connectors on the edge of the board. Connectors pin assignment is described in the next part of this instruction. It includes full descriptions of ATmega128 pins and their alternative functions. The module is equipped with microprocessor reset circuit (when power on) and reset button for microprocessor restart. Microprocessor can be programmed with ISP or JTAG programmer.

To the seventh pin of port B (named as PB7) the status LED (described as PB7 on the board) is connected. This LED can be used as a status indicator of application software. Low state on PB7 pin causes the status LED to be lit.

Module provides two serial ports described on the board as UART1 and UART2. The first one is 9-pin female connector (DB-9 PC serial port compatible) and the second is 3-pin connector. MAX232 circuit provides signal conversion to serial standard.

Multiplexer 74HC4053 provides full use of ports, including those used for microprocessor programming, because in reset state (when programmed) the processor multiplexer switches PE0, PE1 and PB1 signals to ISP and JTAG connector. When the processor is in run state, these signals are switched to connectors on the edge of the board.

Module is equipped with external memory (Atmel AT45DB041B). It is 4Mbit serial data flash memory connected to Master/Slave SPI serial interface of the microprocessor. Internal Real Time Clock is connected to external 32.768 kHz crystal resonator named as X2 on the board.

Connector Pins and Functions

NrPinAlternative function / Description
1PD7T2Timer/Counter2 Clock Input
2PD6T1Timer/Counter1 Clock Input
3PD5XCK1USART1 External Clock Input/Output
4PD4IC1Timer/Counter1 Input Capture Trigger
5PD3INT3/TXD1External Interrupt3 Input or UART1 Transmit Pin
6PD2INT2/RXD1External Interrupt2 Input or UART1 Receive Pin
7PD1INT1/SDAExternal Interrupt1 Input or TWI Serial Data
8PD0INT0/SCLExternal Interrupt0 Input or TWI Serial Clock
9VCC-+5V
10GND-GND
11PB7OC2/OC1C Output Compare and PWM Output for Timer/Counter2 or Output Compare and PWM Output C for Timer/Counter1
12PB6OC1BOutput Compare and PWM Output B for Timer/Counter1
13PB5OC1AOutput Compare and PWM Output A for Timer/Counter1
14PB4OC0Output Compare and PWM Output for Timer/Counter0
15PB3MISOSPI Bus Master Input/Slave Output
16PB2MOSISPI Bus Master Output/Slave Input
17PB1SCKSPI Bus Serial Clock
18PB0SSSPI Slave Select Input
19PE7INT7/IC3External Interrupt 7 Input or Timer/Counter3 Input Capture Trigger
20PE6INT6/ T3External Interrupt 6 Input or Timer/Counter3 Clock Input
21PE5INT5/OC3C External Interrupt 5 Input or Output Compare and PWM Output C for Timer/Counter3
22PE4INT4/OC3B External Interrupt4 Input or Output Compare and PWM Output B for Timer/Counter3
23PE3AIN1/OC3A Analog Comparator Negative Input or Output Compare and PWM Output A for Timer/Counter3
24PE2AIN0/XCK0 Analog Comparator Positive Input or USART0 external clock input/output
25PE1PDO/TXD0Programming Data Output or UART0 Transmit Pin
26PE0PDI/RXD0Programming Data Input or UART0 Receive Pin
NrPinAlternative function / Description
1GND-GND
2VCC-+5V
3PA0AD0External memory interface address and data bit 0
4PA1AD1External memory interface address and data bit 1
5PA2AD2External memory interface address and data bit 2
6PA3AD3External memory interface address and data bit 3
7PA4AD4External memory interface address and data bit 4
8PA5AD5External memory interface address and data bit 5
9PA6AD6External memory interface address and data bit 6
10PA7AD7External memory interface address and data bit 7
11-NCNot connected
12-NCNot connected
13PG2ALEAddress Latch Enable to external memory
14-NCNot connected
15PC6A14External memory interface address and data bit 14
16PC7A15External memory interface address and data bit 15
17PC4A12External memory interface address and data bit 12
18PC5A13External memory interface address and data bit 13
19PC2A10External memory interface address and data bit 10
20PC3A11External memory interface address and data bit 11
21PC0A8External memory interface address and data bit 8
22PC1A9External memory interface address and data bit 9
23PG0WRWrite strobe to external memory
24PG1RDRead strobe to external memory
25-NCNot connected
26-NCNot connected
NrPinAlternative function / Description
1VCC-+5V
2GND-GND
3REFAREFAnalog reference voltage for ADC
4GND-GND
5PF0ADC0ADC input channel 0
6GND-GND
7PF1ADC1External memory interface address and data bit 4
8GND-GND
9PF2ADC2External memory interface address and data bit 6
10GND-GND
11PF3ADC3Not connected
12GND-GND
13PF4ADC4/TCKADC input channel 4 or JTAG Test ClocK
14GND-GND
15PF5ADC5/TMSADC input channel 5 or JTAG Test Mode Select
16GND-GND
17PF6ADC6/TDOADC input channel 6 or JTAG Test Data Output
18GND-GND
19PF7ADC7/TDIADC input channel 7 or JTAG Test Data Input
20GND-GND

Connecting Module

When connecting the controller module with other peripheral modules and devices, one should connect the power supply last. If power is on, it is dangerous to connect and disconnect external devices. Modules have to be connected with each other with great care without applying strong force as this can bend connectors. JTAG-ICE programmer have to be connected to the correct port and the ribbon cable directs out from board (red stripe is by the power supply connector side).

en/hardware/homelab/controller/atmega128.txt · Last modified: 2013/03/26 23:15 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0