Загрузка переменной из памяти
60@90
80@90 corner: 140@130
60@90 corner: 160@130
83.5d@103.5d
350@110
370@110 corner: 498.0d@150
350@110 corner: 518.0d@150
374@133.5d
350@110 corner: 370@130
170@40
190@40 corner: 230@80
170@40 corner: 250@80
196.5d@54.5d
I
170@70
184@70
170@60 corner: 184@80
230@60 corner: 250@80
250@70
4
Q
9.0d
230@70
250@70 corner: 250@140
En
350@140
370@140
350@130 corner: 370@150
350@120
1
установка температуры
3
0
120.0d
7.0d
370@120
160@120 corner: 160@120
V
10.0d
140@120
160@120
140@110 corner: 160@130
2
temper
установка температуры охлаждения
240
загрузка переменной в числовую ячейку некстион
460@40
480@40 corner: 560@100
460@40 corner: 580@100
482.0d@54.0d
230@10
250@10 corner: 290@50
230@10 corner: 310@50
256.5d@24.5d
230@40
244@40
230@30 corner: 244@50
290@30 corner: 310@50
310@40
9.0d
290@40
310@40 corner: 310@70
Send
460@70
480@70
460@60 corner: 480@80
20@80
40@80 corner: 168.0d@100
20@80 corner: 188.0d@100
44@93.5d
20@90
40@90
20@80 corner: 40@100
168.0d@80 corner: 188.0d@100
188.0d@90
120.0d
7.0d
0.0d
168.0d@90
188.0d@90 corner: 188.0d@90
Value
460@90
480@90
460@80 corner: 480@100
Панель1
16
tsr1
17
tsr2
18
tsr3
19
tsr4
20
tsr5
46
n0
48
n1
50
n2
51
n3
52
n4
53
n5
57
bt0
58
bt1
59
tem1
60
Rh1
66
t12
67
t13
73
tempaqva
температура в аквариуме
77
tempBP
замер температуры блока питания
Main
n0
n1
n2
n3
21
n4
27
va5
22
va0
23
va1
30
b11
page1
save
кнопка сохранения параметров
oxl
установка температуры охлаждения БП
8
va0
9
va1
10
podsvetka
регулировка уровня подсветки
страница настройки таймеров
taimer
input
190
.............................................опрос номера страницы
50@0
70@0 corner: 150@40
50@0 corner: 170@40
77.5d@14.0d
230@20
250@20 corner: 306.0d@40
230@20 corner: 326.0d@40
254@33.5d
230@20 corner: 250@40
306.0d@30
326.0d@30
306.0d@20 corner: 326.0d@40
230@30
страница
48.0d
7.0d
250@30
170@30 corner: 170@30
ID
11.0d
150@30
170@30
150@20 corner: 170@40
получение данных с температурного датчика
100@50
120@50 corner: 171.0d@90
100@50 corner: 191.0d@90
125.0d@63.5d
in
100@80
120@80
80.0d@83.5d
ds18b20
9810b2b2-212d-44f3-9e90-9b523ad56430
3ccd3543-874f-4e98-8565-35a4b6eb317e
temp
c9908efe-2013-4a9b-abb9-58e30a7ef5c3
416572b7-91eb-40b3-a3ac-f8085d356794
1e6187a7-9a07-4ed4-b404-fdd4811c9bb8
ds18b20
pins
fc90140a-148e-40ab-a389-6fd964f58feb
94c8e289-5ca7-4421-baf5-3674390c0cf2
if(in){
ds.reset();
ds.write(0xCC);
ds.write(0xBE); // Read Scratchpad
for ( i = 0; i < 9; i++) { // we need 9 bytes
data[i] = ds.read();}
int16_t raw = (data[1] << 8) | data[0];
raw = raw << 3; // 9 bit resolution default
raw = raw & ~7; // 9 bit resolution, 93.75 ms
temp = (float)raw / 16.0;
ds.reset();
ds.write(0xCC);
ds.write(0x44, 1); //start
}
395
#include
<OneWire.h>
ds
(pins);
OneWire
i
;
byte
data
[12];
byte
100@70 corner: 120@90
370@30
390@30 corner: 470@70
370@30 corner: 490@70
391.0d@44.5d
370@50 corner: 390@70
550@30
570@30 corner: 650@90
550@30 corner: 670@90
572.0d@44.0d
550@50 corner: 570@70
360@100
380@100 corner: 420@140
360@100 corner: 440@140
383.5d@113.5d
I
360@130
380@130
360@120 corner: 380@140
420@120 corner: 440@140
440@130
dec
Q
9.0d
420@130
440@80 corner: 440@130
Value
550@80
570@80
550@70 corner: 570@90
550@60
Send
570@60
580@190
600@190 corner: 689.0d@230
580@190 corner: 709.0d@230
604@213.5d
370@190
390@190 corner: 440@230
370@190 corner: 460@230
391.5d@203.5d
250@170
270@170 corner: 330@230
250@170 corner: 350@230
285.5d@184.0d
I1
250@200
270@200
250@190 corner: 270@210
I2
250@220
270@220
237.0d@223.5d
250@210 corner: 270@230
330@210 corner: 350@230
350@220
Q
9.0d
330@220
350@220 corner: 350@220
Fl
370@220
390@220
370@210 corner: 390@230
440@210 corner: 460@230
460@220
Q
9.0d
440@220
460@200 corner: 460@220
580@200
600@200
580@190 corner: 600@210
580@210 corner: 600@230
580@220
темп аквариума
81.0d
7.0d
600@220
490@60 corner: 490@220
Q
9.0d
470@60
490@60
470@50 corner: 490@70
370@60
Value
390@60
191.0d@60 corner: 191.0d@200
26.0d
171.0d@80
191.0d@80
171.0d@70 corner: 191.0d@90
76417b74-2358-4f0f-9fb9-fe3c60dc128d
if(in){
ds.reset();
ds.write(0xCC);
ds.write(0xBE); // Read Scratchpad
for ( i = 0; i < 9; i++) { // we need 9 bytes
data[i] = ds.read();}
int16_t raw = (data[1] << 8) | data[0];
temp = (float)raw / 16.0;
ds.reset();
ds.write(0xCC);
ds.write(0x44, 1); //start
}
304
#include
<OneWire.h>
ds
(pins);
OneWire
i
;
byte
data
[9];
byte
51.0d
320
Сохранение в память контроллера значения введенного с дисплея и включение куллера охлаждения при превышении переменной
==
450@170
470@170 corner: 530@230
450@170 corner: 550@230
484.5d@184.0d
250@180
270@180 corner: 359.0d@200
250@180 corner: 379.0d@200
274@193.5d
250@190
270@190
250@180 corner: 270@200
359.0d@180 corner: 379.0d@200
379.0d@190
81.0d
7.0d
0.0d
359.0d@190
450@250
470@250 corner: 530@310
450@250 corner: 550@310
484.5d@264.0d
450@270 corner: 470@290
340@290
360@290 corner: 420@350
340@290 corner: 440@350
376.0d@304.0d
240@240
260@240 corner: 320@300
240@240 corner: 340@300
275.5d@254.0d
40@260
60@260 corner: 188.0d@280
40@260 corner: 208.0d@280
64@273.5d
40@270
60@270
40@260 corner: 60@280
188.0d@260 corner: 208.0d@280
208.0d@270
120.0d
7.0d
0.0d
188.0d@270
208.0d@270 corner: 208.0d@270
I1
240@270
260@270
240@260 corner: 260@280
I2
240@290
260@290
227.0d@293.5d
240@280 corner: 260@300
320@280 corner: 340@300
240@290
340@290
9.0d
320@290
I2
450@220
470@220
340@220 corner: 340@320
I1
340@320
360@320
340@310 corner: 360@330
I2
5
340@340
360@340
332.0d@343.5d
340@330 corner: 360@350
420@330 corner: 440@350
440@340
9.0d
420@340
440@300 corner: 440@340
I2
450@300
470@300
450@290 corner: 470@310
600@260
620@260 corner: 660@300
600@260 corner: 680@300
626.5d@274.5d
600@280 corner: 620@300
690@210
710@210 corner: 750@270
690@210 corner: 770@270
722.0d@223.5d
600@200
620@200 corner: 660@240
600@200 corner: 680@240
626.5d@214.5d
9.0d
530@220
550@220
550@220 corner: 550@230
I
600@230
620@230
600@220 corner: 620@240
660@220 corner: 680@240
680@230
9.0d
660@230
680@230 corner: 680@240
S
690@240
710@240
690@230 corner: 710@250
690@250 corner: 710@270
830@280
850@280 corner: 896.0d@300
830@280 corner: 916.0d@300
854@294.5d
830@280 corner: 844@300
830@290
вкл куллер 1
Кулер 1
38
38.0d
9.0d
844@290
830@320
850@320 corner: 902.0d@340
830@320 corner: 922.0d@340
854@334.5d
830@320 corner: 844@340
830@330
вкл куллер 2
куллер 2
39
44.0d
9.0d
844@330
770@260 corner: 770@330
9.0d
750@260
770@260
750@250 corner: 770@270
690@260
R
710@260
680@260 corner: 680@290
9.0d
660@290
680@290
660@280 corner: 680@300
600@290
620@290
550@290 corner: 550@300
9.0d
530@300
550@300
530@290 corner: 550@310
450@280
<
I1
470@280
379.0d@190 corner: 379.0d@280
I1
450@200
470@200
450@190 corner: 470@210
450@210 corner: 470@230
530@210 corner: 550@230
>
90
опрос установок . выполняется только когда вы находитесь на стр.1
10@40
30@40 corner: 110@80
10@40 corner: 130@80
31.5d@54.0d
190@10
210@10 corner: 290@50
190@10 corner: 310@50
211.0d@24.5d
190@30 corner: 210@50
520@100
540@100 corner: 668.0d@140
520@100 corner: 688.0d@140
544@123.5d
520@110
540@110
520@100 corner: 540@120
520@120 corner: 540@140
520@130
120.0d
7.0d
540@130
600@0
620@0 corner: 680@60
600@0 corner: 700@60
623.5d@13.5d
600@30
V
600@50
620@50
EN
620@30
310@30 corner: 310@130
Q
9.0d
290@40
310@40
290@30 corner: 310@50
190@40
Value
210@40
130@40 corner: 130@110
Value
30.0d
110@70
130@70
110@60 corner: 130@80
periodically
1000
230
(0 to: 240)
(240 to: 430)
(430 to: 620)
(620 to: 940)
(940 to: 1030)
(1030 to: 1260)
Температура в аквариуме
temp aqva
Arduino Mega 2560
6
7
11
12
13
14
15
24
25
26
28
29
31
32
33
34
35
36
37
40
41
42
43
44
45
47
49
54
55
56
61
62
63
64
65
68
69
Общие сведения
Arduino Mega построена на микроконтроллере ATmega2560 . Плата имеет 54 цифровых входа/выходов (14 из которых могут использоваться как выходы ШИМ), 16 аналоговых входов,4 последовательных порта UART, кварцевый генератор 16 МГц, USB коннектор, разъем питания, разъем ICSP и кнопка перезагрузки. Для работы необходимо подключить платформу к компьютеру посредством кабеля USB или подать питание при помощи адаптера AC/DC, или аккумуляторной батареей. Arduino Mega 2560 совместима со всеми платами расширения, разработанными для платформ Uno или Duemilanove.
Краткие характеристики
Микроконтроллер ATmega2560
Рабочее напряжение 5В
Входное напряжение (рекомендуемое) 7-12В
Входное напряжение (предельное) 6-20В
Цифровые Входы/Выходы 54 (14 из
которых могут
работат также
как выходы
ШИМ)
Аналоговые входы 16
Постоянный ток через вход/выход 40 mA
Постоянный ток для вывода 3.3 В 50 mA
Флеш-память 256 KB (из
которых 8 КB используются
для загрузчика)
ОЗУ 8 KB
Энергонезависимая память 4 KB
Тактовая частота 16 MHz
Питание
Arduino Mega может получать питание как через подключение по USB, так и от внешнего источника питания. Источник питания выбирается автоматически.
Внешнее питание (не USB) может подаваться через преобразователь напряжения AC/DC (блок питания) или аккумуляторной батареей. Преобразователь напряжения подключается посредством разъема 2.1 мм с положительным полюсом на центральном контакте. Провода от батареи подключаются к выводам Gnd и Vin разъема питания (POWER).
Платформа может работать при внешнем питании от 6 В до 20 В. При напряжении питания ниже 7 В, вывод 5V может выдавать менее 5 В, при этом платформа может работать нестабильно. При использовании напряжения выше 12 В регулятор напряжения может перегреться и повредить плату. Рекомендуемый диапазон от 7 В до 12 В.
Плата Mega2560, в отличие от предыдущих версий плат, не использует FTDI USB микроконтроллер. Для обмена данными по USB используется микроконтроллер Atmega8U2, запрограммированный как конвертер USB-to-serial.
Выводы питания:
VIN. Вход используется для подачи питания от внешнего источника (в отсутствие 5 В от разъема USB или другого регулируемого источника питания). Подача напряжения питания происходит через данный вывод. Если питание подается на разьем 2.1mm, то на этот вход можно запитаться.
5V. Регулируемый источник напряжения, используемый для питания микроконтроллера и компонентов на плате. Питание может подаваться от вывода VIN через регулятор напряжения, или от разъема USB, или другого регулируемого источника напряжения 5 В.
3V3. Напряжение на выводе 3.3 В генерируемое микросхемой FTDI на платформе. Максимальное потребление тока 50 мА.
GND. Выводы заземления.
Память
Микроконтроллер ATmega2560 имеет: 256 кБ флеш-памяти для хранения кода программы (4 кБ используется для хранения загрузчика), 8 кБ ОЗУ и 4 Кб EEPROM
Входы и Выходы
Каждый из 54 цифровых выводов Mega, может настраиваться как вход или выход. Выводы работают при напряжении 5 В. Каждый вывод имеет нагрузочный резистор (стандартно отключен) 20-50 кОм и может пропускать до 40 мА. Некоторые выводы имеют особые функции:
Последовательная шина: 0 (RX) и 1 (TX);
Последовательная шина 1: 19 (RX) и 18 (TX);
Последовательная шина 2: 17 (RX) и 16 (TX);
Последовательная шина 3: 15 (RX) и 14 (TX).
Выводы используются для получения (RX) и передачи (TX) данных TTL. Выводы 0 и 1 подключены к соответствующим выводам микросхемы последовательной шины ATmega8U2.
Внешнее прерывание: 2 (прерывание 0), 3 (прерывание 1), 18 (прерывание 5), 19 (прерывание 4), 20 (прерывание 3), и 21 (прерывание 2).
Данные выводы могут быть сконфигурированы на вызов прерывания либо на младшем значении, либо на переднем или заднем фронте, или при изменении значения.
PWM: 2 до 13 и 44-46.
Любой из выводов обеспечивает ШИМ с разрешением 8 бит при помощи функции analogWrite().
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). Посредством данных выводов осуществляется связь SPI, например, используя библиотеку SPI. Также выводы SPI могут быть выведены на блоке ICSP, который совместим с платформами Uno, Duemilanove и Diecimila.
LED: 13. Встроенный светодиод, подключенный к цифровому выводу 13. Если значение на выводе имеет высокий потенциал, то светодиод горит.
I2C: 20 (SDA) и 21 (SCL). Посредством выводов осуществляется связь I2C (TWI).
Расположение выводов на платформе Mega не соответствует расположению Duemilanove или Diecimila.
На платформе Mega2560 имеется 16 аналоговых входов, каждый разрешением 10 бит (т.е. может принимать 1024 различных значения).
Дополнительная пара выводов платформы:
AREF. Опорное напряжение для аналоговых входов.
Reset. Низкий уровень сигнала на выводе перезагружает микроконтроллер. Обычно применяется для подключения кнопки перезагрузки на плате расширения, закрывающей доступ к кнопке на самой плате Arduino.
Связь
На платформе Arduino Mega2560 установлено несколько устройств для осуществления связи с компьютером, другими устройствами Arduino или микроконтроллерами. ATmega2560 поддерживает 4 порта последовательной передачи данных UART для TTL. Установленная на плате микросхема ATmega8U2 направляет один из интерфейсов через USB, предоставляя виртуальный COM порт программам на компьютере (машинам под упровлением Windows для корректной работы с виртуальным COM портом необоходим .inf файл, системы на базе OSX и Линукс, автоматически распознаю COM порт). Утилита мониторинга последовательной шины (Serial Monitor) среды разработки Arduino позволяет посылать и получать текстовые данные при подключении к платформе. Светодиоды RX и TX на платформе будут мигать при передаче данных через микросхему ATmega8U2 и USB подключение (но не при использовании последовательной передачи через выводы 0 и 1).
ATmega2560 поддерживает интерфейсы I2C (TWI) и SPI.
Автоматическая (программная) перезагрузка
Mega разработана таким образом, чтобы перед записью нового кода перезагрузка осуществлялась самой программой, а не нажатием кнопки на платформе. Одна из линий ATmega8U2, управляющих потоком данных (DTR), подключена к выводу перезагрузки микроконтроллера ATmega2560 через конденсатор 100 нФ. Активация данной линии, т.е. подача сигнала низкого уровня, перезагружает микроконтроллер. Программа Arduino, используя данную функцию, загружает код одним нажатием кнопки Upload в самой среде программирования. Подача сигнала низкого уровня по линии DTR скоординирована с началом записи кода, что сокращает таймаут загрузчика.
Функция имеет еще одно применение. Перезагрузка Mega2560 происходит каждый раз при подключении к программе Arduino на компьютере с ОС Mac X или Linux (через USB). Следующие полсекунды после перезагрузки работает загрузчик. Во время программирования происходит задержка нескольких первых байтов кода во избежание получения платформой некорректных данных (всех, кроме кода новой программы). Если производится разовая отладка скетча, записанного в платформу, или ввод каких-либо других данных при первом запуске, необходимо убедиться, что программа на компьютере ожидает в течение секунды перед передачей данных.
На Mega2560 имеется возможность отключить линию автоматической перезагрузки разрывом соответствующей линии. Контакты микросхем с обоих концов линии затем могут быть соединены с целью восстановления. Линия маркирована «RESET-EN». Отключить автоматическую перезагрузку также возможно подключив резистор 110 Ом между источником 5 В и данной линией.
Токовая защита разъема USB
В Arduino Mega2560 встроена перезагружаемая плавкая вставка, защищающая порт USB компьютера от токов короткого замыкания и сверхтоков. Хотя практически все компьютеры имеют подобную защиту, тем не менее, данный предохранитель обеспечивает дополнительный барьер. Предохранитель автоматически прерывает обмен данных при прохождении тока более 500 мА через USB порт.
Физические характеристики и совместимость с платами расширения
Длинна и ширина печатной платы Mega2560 составляют 10,2 и 5.3 см соответственно. Разъем USB и силовой разъем выходят за границы данных размеров. Три отверстия в плате позволяют закрепить ее на поверхности. Расстояние между цифровыми выводами 7 и 8 равняется 0,4 см, хотя между другими выводами оно составляет 0,25 см.
Arduino Mega2560 совместима со всеми платами расширения, разработанными для платформ Uno, Duemilanove или Diecimila. Расположение выводов 0 – 13 (и примыкающих AREF и GND), аналоговых входов 0 – 5, силового разъема, блока ICSP, порта последовательной передачи UART (выводы 0 и 1) и внешнего прерывания 0 и 1 (выводы 2 и 3) на Mega соответствует расположению на вышеприведенных платформах. Связь SPI может осуществляться через блок ICSP, как на платформах Duemilanove / Diecimila, так и на Mega2560. Однако расположение выводов (20 и 21) связи I2C на платформе Mega не соответствуют расположению тех же выводов (аналоговые входы 4 и 5) на Duemilanove / Diecimila.
9804
6eecad4c-bea7-4184-8a1c-e561047851ff.png
c6b614c0-06c5-4439-90f8-9a55510ecd93.png
D
D
4096
uno
mega
atmega2560
General information
The Arduino Mega is built on ATmega2560 microcontroller . The Board has 54 digital inputs/outputs (of which 14 can be used as PWM outputs), 16 analog inputs,4 serial port UART crystal oscillator 16 MHz, USB connector, power Jack, ICSP and the reset button. For the work necessary to connect the platform to a computer via a USB cable or power it with a AC/DC adapter or battery to get started. Arduino Mega 2560 compatible with all expansion boards designed for duemilanove or Duemilanove.
A brief description
Microcontroller ATmega2560
Working voltage 5V
Input voltage (recommended) 7-12V
Input voltage (limits) 6-20V
Digital Inputs/Outputs 54 (14 of
which can
the work is also
as outputs
PWM)
Analog inputs 16
DC current through input/output 40 mA
DC current for 3.3 V pin 50 mA
Flash memory 256 KB (from
which 8 KV are used
for loader)
RAM 8 KB
Nonvolatile memory 4 KB
Clock speed 16 MHz
Food
Arduino Mega can be powered via USB connection or with an external power source. The power source is selected automatically.
External power (not USB) can be supplied via an AC/DC adapter (wall-wart) or battery. The voltage Converter is connected by connector 2.1 mm with positive pole at the Central contact. The wires from the battery connect to the Gnd and Vin pin headers of the POWER connector).
The platform can work with external supply from 6 V to 20 V. When the supply voltage is below 7 V, the output of 5V can give less than 5, the platform may become unstable. When using voltage higher than 12V, the voltage regulator may overheat and damage the Board. The recommended range is from 7 V to 12 V.
Board Mega2560, unlike previous versions of the boards does not use the FTDI USB microcontroller. To communicate over USB uses the Atmega8U2 microcontroller programmed as a USB Converter to serial.
Power pins:
VIN. Input is used to supply power from an external source (in the absence of the 5 volts from the USB connection or other regulated power source). The power supply takes place through this pin. If power is available on connector 2.1 mm, this input can be energized.
5V. Voltage source used to power the microcontroller and other components on the Board. Power may be supplied from VIN via a voltage regulator or from USB or another regulated voltage source of 5 V.
3V3. The voltage at the output of the 3.3 V FTDI chip generated on the platform. The maximum current consumption of 50 mA.
GND. The conclusions of the ground.
Memory
Microcontroller ATmega2560 has 256 KB of flash memory for storing program code (4 KB is used to store the bootloader), 8 KB of SRAM and 4 KB EEPROM
Inputs and Outputs
Each of the 54 digital pins of the Mega, can be configured as input or output. Insights operate at a voltage of 5 V. Each output has a load resistor (default off) 20-50 ohms and can handle up to 40 mA. Some pins have special functions:
Serial bus: 0 (RX) and 1 (TX);
Serial bus 1: 19 (RX) and 18 (TX);
Serial bus 2: 17 (RX) and 16 (TX);
Serial bus 3: 15 (RX) and 14 (TX).
Pins are used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 connected to the corresponding pins of the serial chip the ATmega8U2.
External interrupt: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2).
These pins can be configured for call interruption or the lower value, either for front or rear front or when you change the value.
PWM: 2 to 13 and 44 to 46.
Any insights provides PWM resolution of 8 bits by using the analogWrite().
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication, for example, using the SPI library. Also the SPI pins are to be out on the ICSP header, which is compatible with Uno, Duemilanove and Diecimila.
LED: 13. Built-in led connected to digital pin 13. If the value on the output is held high, the led is illuminated.
I2C: 20 (SDA) and 21 (SCL). By means of pins communicates I2C (TWI).
The Pinout on the Mega platform doesn't match the location Duemilanove or Diecimila.
On the platform Mega2560 has 16 analog inputs each with 10 bits of resolution (i.e. 1024 different values).
An additional pair of pins on the Board:
AREF. The reference voltage for the analog inputs.
Reset. The low level signal at pin resets the microcontroller. Typically used to connect the reset button on the expansion card, closing access to the button on the Arduino Board.
Link
The Arduino Mega2560 has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. ATmega2560 supports 4 ports serial data UART to TTL. Mounted on the Board chip ATmega8U2 sends one of the interfaces via USB providing a virtual COM port to software on the computer (machines under control of Windows to work correctly with virtual COM port neobhodim .inf file, a system based on OSX and Linux automatically recognize COM port). Monitoring utility Serial Monitor of the Arduino development environment allows you to send and receive text data when you connect to the platform. The RX and TX LEDs on the Board will flash when data transfer via the ATmega8U2 chip and USB connection (but not for serial communication via pins 0 and 1).
The ATmega2560 also supports I2C (TWI) and SPI communication.
Automatic (software) reset
Mega is designed in such a way that the new code before recording a restart is performed by the program, instead of pressing buttons on the platform. One of the lines the ATmega8U2 that controls the data flow (DTR), connected to the output of the restart of the microcontroller ATmega2560 via a 100 nF capacitor. Activation of this line, i.e. the signal of the low level, resets the microcontroller. The Arduino software uses this capability to upload code by simply pressing the Upload button in the Arduino environment. Supply low-level signal at the DTR coordinated with the beginning of writing code that reduces the loader timeout.
The function has another use. Mega2560 reboot happens every time you connect to the Arduino program on a computer with Mac OS X or Linux (via USB). Following half a second after the reboot bootloader works. During programming intercept the first few bytes of code to avoid incorrect data platform (all except the code of the new program). If you are debugging one-off sketch recorded in the platform or entering any other data when you first start, you must make sure that the computer waits for a second before transmitting the data.
On the Mega2560 has an option to disable the auto-restart gap of the respective line. The contacts of the chips with both ends of the line can then be connected to restore. The line labeled "RESET-EN". Disable automatic restart also possible by connecting a 110 Ohm resistor with a 5 V source and this line.
Current protection of the USB connector
The Arduino Mega2560 has a resettable fuse that protects the computer's USB ports from short-circuit currents and overcurrents. Although virtually all computers have this protection, however, this fuse provides an additional barrier. The fuse automatically interrupts the exchange of data with the passage of the current more than 500 mA via USB port.
Physical characteristics and compatibility
Length and width of the Mega2560 PCB are 10.2 and 5.3 cm, respectively. USB connector and power Jack extending beyond the former dimensions. Three screw holes allow the Board to secure it to the surface. The distance between digital pins 7 and 8 is equal to 0.4 cm, although other findings, it is 0,25 m.
Arduino Mega2560 compatible with all expansion boards designed for the Uno, Duemilanove or Diecimila. The location of the pins 0 – 13 (and the adjacent AREF and GND pins), analog inputs 0 – 5, power Jack, ICSP header port serial UART (pins 0 and 1) and the external interrupts 0 and 1 (pins 2 and 3) on the Mega corresponds to the location on the above platforms. SPI communication can be done through the ICSP header on both the Duemilanove / UNO and Mega2560. However, the arrangement of leads (20 and 21) I2C communication on the platform of Mega not correspond to the location of the same pins (analog inputs 4 and 5) on the Duemilanove / Diecimila.
9600
arduinoIDE
139
255549439
Contr1
Tags1
Variables1
0@0
LibraryRoot
0@0
451
0@-240
169
345
0@-120
root
output
globalVariable