This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:hardware:homelab:controller:atmega2561 [2011/10/21 13:40] – illo | en:hardware:homelab:controller:atmega2561 [2020/07/20 12:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| ====== Controller module ATmega2561 v1.x ====== | ====== Controller module ATmega2561 v1.x ====== | ||
| - | <note important> | + | The main module of the HomeLab is a controller development board (controller board) equipped with the AVR ATmega2561 microcontroller. In addition to the microcontroller, |
| - | The main module of the HomeLab is a controller development board (controller board) equipped with the AVR ATmega2561 microcontroller. In addition to the microcontroller, | + | |
| * ATmega2561-16AU microcontroller | * ATmega2561-16AU microcontroller | ||
| Line 11: | Line 11: | ||
| * 14,7456 MHz clock | * 14,7456 MHz clock | ||
| * Ethernet module with RJ45 connector | * Ethernet module with RJ45 connector | ||
| - | * SD card slot | + | * SD memory |
| * Status LED (PB7)and Power LED | * Status LED (PB7)and Power LED | ||
| * Programmable button (PC2) and reset button | * Programmable button (PC2) and reset button | ||
| Line 18: | Line 18: | ||
| * Automatic power switch USB or external power supply | * Automatic power switch USB or external power supply | ||
| * Built-in voltage stabilizer, with 5 V and 3,3 V output | * Built-in voltage stabilizer, with 5 V and 3,3 V output | ||
| - | [{{ : | + | [{{ : |
| - | Module | + | The module |
| + | The module can be powered with a step down transformer with an output voltage which is greater than 6 volts and lower than 15 volts. In order to reduce power losses it is recommended to use power supply between 6-9V. The POWER LED signalizes a connected feed (“POWER” description on the board). | ||
| + | All ATmega2561 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 ATmega2561 pins and their alternative functions. The module is equipped with a microprocessor reset circuit (when power on) and a reset button for a microprocessor restart. A microprocessor can be programmed with an on-board JTAG programmer over USB or with an ISP interface. | ||
| + | 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. | ||
| + | The module is equipped with SD memory card slot, where it can be used as a standard microSD memory card. The memory card is connected to the microcontroller via the ISP interface and can be used to store data where data must be maintained even if the power supply is removed. | ||
| - | 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 | + | [{{: |
| - | 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. | + | ===== Connector Pins and Functions |
| - | + | ||
| - | 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, | + | |
| - | + | ||
| - | Module is equipped with external memory (Atmel AT45DB041B). It is 4Mbit serial data flash memory connected to Master/ | + | |
| - | + | ||
| - | + | ||
| - | Kontrollermooduli plaat on varustatud alaldiga ja pingestabilisaatoriga. Sisendpingeks sobib plaadile 6-15 V. Voolukadude minimeerimiseks on soovitatav kasutada 6-9 V pingeallikat. Toite ühendamisel peab plaadil toite LED põlema hakkama. Kui see ei sütti, võib põhjus olla puudulikus toites või hoopis lühises Kontrollermooduli plaadil või temaga ühendatud seadmetes. Mikrokontrollerit saab programmeerida üle USB JTAG või ISP liidese kaudu. JTAG meetod toetab lisaks lihtsale programmi pealelaadimisele ka programmikoodi silumist. | + | |
| - | + | ||
| - | Kontrollermooduli plaat on varustatud oleku LED-iga, mis on ühendatud mikrokontrolleri viiguga PB7. LED süttib, kui viik seada madalasse olekusse (loogiline 0). Seda on hea kasutada lihtsa indikaatorina. | + | |
| - | + | ||
| - | Plaadile on paigaldatud SD mälukaardi pesa kuhu on võimalik sisestada standardne mikro SD mälukaart. Mälukaart on ühendatud SPI liidese kaudu mikrokontrolleriga ja seda võib kasutada andmete salvestamiseks, | + | |
| - | + | ||
| - | [{{: | + | |
| - | + | ||
| - | ===== Ühenduspesade viigud ja nende funktsioonid | + | |
| {{: | {{: | ||
| ~~CL~~ | ~~CL~~ | ||
| - | ^Nr^Viik^Alternatiivfunktsioon | + | ^Nr^Pin^Alternative function |
| |1|VCC|- | |1|VCC|- | ||
| - | |2|GND|- | + | |2|GND|- |
| - | |3|REF|AREF|ADC | + | |3|REF|AREF|Analog Reference Voltage For ADC | |
| - | |4|GND|- | + | |4|GND|- |
| - | |5|PF0|ADC0|ADC | + | |5|PF0|ADC0|ADC |
| - | |6|GND|-|Maa | | + | |6|GND|-|GND | |
| - | |7|PF1|ADC1|ADC | + | |7|PF1|ADC1|ADC |
| - | |8|GND|-|Maa | | + | |8|GND|-|GND | |
| - | |9|PF2|ADC2|ADC | + | |9|PF2|ADC2|ADC |
| - | |10|GND|-|Maa | | + | |10|GND|-|GND | |
| - | |11|PF3|ADC3|ADC | + | |11|PF3|ADC3|ADC |
| - | |12|GND|-|Maa | | + | |12|GND|-|GND | |
| - | ~~PB~~ | + | < |
| {{: | {{: | ||
| ~~CL~~ | ~~CL~~ | ||
| - | ^Nr^Viik^Alternatiivfunktsioon | + | ^Nr^Pin^Alternative function |
| - | |1 |PD7|T2 | + | |1 |PD7|T2 |
| - | |2 |PD6|T1 | + | |2 |PD6|T1 |
| - | |3 |PD5|XCK1 | + | |3 |PD5|XCK1 |
| - | |4 |PD4|IC1 | + | |4 |PD4|IC1 |
| - | |5 |PD3|INT3/ | + | |5 |PD3|INT3/ |
| - | |6 |PD2|INT2/ | + | |6 |PD2|INT2/ |
| - | |7 |PD1|INT1/ | + | |7 |PD1|INT1/ |
| - | |8 |PD0|INT0/ | + | |8 |PD0|INT0/ |
| - | |9 |VCC|- | + | |9 |VCC|- |
| - | |10|GND|- | + | |10|GND|- |
| - | |11|PB7|OC0A/ | + | |11|PB7|OC0A/ |
| - | |12|PB6|OC1B/ | + | |12|PB6|OC1B/ |
| - | |13|PB5|OC1A/ | + | |13|PB5|OC1A/ |
| - | |14|PB4|OC2A/ | + | |14|PB4|OC2A/ |
| - | |15|PB3|MISO/ | + | |15|PB3|MISO/ |
| - | |16|PB2|MOSI/ | + | |16|PB2|MOSI/ |
| - | |17|PB1|SCK/ | + | |17|PB1|SCK/ |
| - | |18|PB0|SS/ | + | |18|PB0|SS/ |
| - | |19|PE7|INT7/ | + | |19|PE7|INT7/ |
| - | |20|PE6|INT6/ | + | |20|PE6|INT6/ |
| - | |21|PE5|INT5/ | + | |21|PE5|INT5/ |
| - | |22|PE4|INT4/ | + | |22|PE4|INT4/ |
| - | |23|PE3|AIN1/ | + | |23|PE3|AIN1/ |
| - | |24|PE2|AIN0/ | + | |24|PE2|AIN0/ |
| - | |25|PE1|PDO/ | + | |25|PE1|PDO/ |
| - | |26|PE0|PDI/ | + | |26|PE0|PDI/ |
| {{: | {{: | ||
| ~~CL~~ | ~~CL~~ | ||
| - | ^Nr^Viik^Alternatiivfunktsioon | + | ^Nr^Pin^Alternative function |
| - | |1 |GND|- | + | |1 |GND|- |
| |2 |VCC|- | |2 |VCC|- | ||
| - | |3 |PA0|AD0|Välismälu-liidese aadressi- ja andmebitt | + | |3 |PA0|AD0|External memory interface address and data bit 0 | |
| - | |4 |PA1|AD1|Välismälu-liidese aadressi- ja andmebitt | + | |4 |PA1|AD1|External memory interface address and data bit 1 | |
| - | |5 |PA2|AD2|Välismälu-liidese aadressi- ja andmebitt | + | |5 |PA2|AD2|External memory interface address and data bit 2 | |
| - | |6 |PA3|AD3|Välismälu-liidese aadressi- ja andmebitt | + | |6 |PA3|AD3|External memory interface address and data bit 3 |
| - | |7 |PA4|AD4|Välismälu-liidese aadressi- ja andmebitt | + | |7 |PA4|AD4|External memory interface address and data bit 4 |
| - | |8 |PA5|AD5|Välismälu-liidese aadressi- ja andmebitt | + | |8 |PA5|AD5|External memory interface address and data bit 5 |
| - | |9 |PA6|AD6|Välismälu-liidese aadressi- ja andmebitt | + | |9 |PA6|AD6|External memory interface address and data bit 6 |
| - | |10|PA7|AD7|Välismälu-liidese aadressi- ja andmebitt | + | |10|PA7|AD7|External memory interface address and data bit 7 |
| - | |11|PG4|TOSC1|RTC | + | |11|PG4|TOSC1|RTC |
| - | |12|PG5|OC0B|Taimer/Loendur0 võrdlustulemuse väljastusüksus B| | + | |12|PG5|OC0B|Output Compare and PWM Output B for Timer/Counter0| |
| - | |13|PG2|ALE|Välismälu-liidese aadressi lukustussignaal | + | |13|PG2|ALE|Address Latch Enable to external memory |
| - | |14|PG3|TOSC2|RTC | + | |14|PG3|TOSC2|RTC |
| - | |15|PC6|A14|Välismälu-liidese aadressi- ja andmebitt | + | |15|PC6|A14|External Memory interface address bit 14 |
| - | |16|PC7|A15|Välismälu-liidese aadressi- ja andmebitt | + | |16|PC7|A15|External Memory interface address bit 15 |
| - | |17|PC4|A12|Välismälu-liidese aadressi- ja andmebitt | + | |17|PC4|A12|External Memory interface address bit 12 |
| - | |18|PC5|A13|Välismälu-liidese aadressi- ja andmebitt | + | |18|PC5|A13|External Memory interface address bit 13 |
| - | |19|PC2|A10|Välismälu-liidese aadressi- ja andmebitt | + | |19|PC2|A10|External Memory interface address bit 10 |
| - | |20|PC3|A11|Välismälu-liidese aadressi- ja andmebitt | + | |20|PC3|A11|External Memory interface address bit 11 |
| - | |21|PC0|A8 |Välismälu-liidese aadressi- ja andmebitt | + | |21|PC0|A8 |External Memory interface address bit 8 | |
| - | |22|PC1|A9 |Välismälu-liidese aadressi- ja andmebitt | + | |22|PC1|A9 |External Memory interface address bit 9 | |
| - | |23|PG0|WR |Välismälu kirjutussignaal | + | |23|PG0|WR |Write strobe to external memory |
| - | |24|PG1|RD |Välismälu lugemissignaal | + | |24|PG1|RD |Read strobe to external memory |
| - | |25|GND|- | + | |25|GND|- |
| |26|3V3|- | |26|3V3|- | ||
| - | ~~PB~~ | + | < |
| - | ===== Ühendamine | + | ===== Connecting |
| - | Kontrollermooduli ühendamisel teiste moodulite ning seadmetega tuleb esmalt veenduda, et Kontrollermooduli toide ei ole ühendatud. Ajal kui plaat on pingestatud, on ohtlik seadmeid ühendada. Mooduleid ja seadmeid tuleb omavahel ühendada ettevaatlikult ja liigset jõudu kasutamata. Vale käsitlemise korral võivad piikriba piigid kergesti kõveraks painduda. Programmeerimiseks ja nõrkvoolu | + | When connecting the controller module with other modules or devices, you must first make sure that the controller module power supply is not connected. Modules and devices must be connected to each other with care. It is important not to use excessive force, wrong handling may damage the module. For programming and to power with low currency |
| - | [{{:kit:kit_2561_test.jpg?580|Kontrollerplaadi ühendamine toite ja programmaatoriga}}] | + | [{{:kit:atmega2561_connected.jpg?580|Controller module connected to power supply and programmer}}] |