Arduino MEGA Wiki

14
Jan
Arduino Mega 2560 je mikrokrmilnik, ki se pogosto uporablja za večje projekte avtomatizacije in robotike. Ima več pomnilnika in več vhodno-izhodnih (I/O) pinov kot manjši Arduino mikrokontrolerji, kar omogoča večjo zmogljivost in kompleksnost projektov.
Arduino Mega 2560 prav tako praviloma uporablja programsko okolje Arduino IDE, ki omogoča enostavno programiranje in povezovanje z različnimi senzorji in napravami. Programsko okolje vključuje jezik C in knjižnice, ki omogočajo komunikacijo z različnimi vrstami senzorjev in naprav.
Mikrokrmilnik ima 54 digitalnih vhodno-izhodnih pinov, ki lahko delujejo kot vhodi za senzorje ali kot izhodi za naprave, kot so LED diode ali motorji. Ima tudi 16 analognih vhodov, ki lahko zaznavajo različne stopnje napetosti in jih pretvorijo v digitalne vrednosti.
Arduino Mega 2560 lahko deluje na napetosti od 6 do 20 voltov in ima integriran USB vmesnik za povezavo z računalnikom. To omogoča enostavno programiranje in nalaganje programske kode ter prenos podatkov med mikrokrmilnikom in računalnikom.
Arduino UNO | Arduino NANO | Arduino MEGA | |
Mikrokrmilnik | Atmel AVR ATmega328P | Atmel AVR ATmega328P | Atmel AVR ATmega2560 |
Delovna napetost | 5V | 5V | 5V |
Zunanje napajanje | 7-12Vdc | 7-12Vdc | 7-12Vdc |
Spomin FLASH | 32kB (2KB bootloader) | 32kB (2KB bootloader) | 256KB (8KB bootloader) |
Spomin SRAM | 2KB | 2KB | 8KB |
EEPROM | 1KB | 1KB | 4KB |
Hitrost takta | 16MHz | 16MHz | 16MHz |
Digitalni I/O | 14 | 22 | 54 |
od tega PWM | 6 | 6 | 15 |
Analogni vhodi | 6 | 8 | 16 |
USB povezljivost | Da | Da | Da |
DC tok na I/O | 20mA | 40mA | 20mA |
Velikost PCB | 53.4 x 68.6 mm | 18 x 45 mm | 53.3 x 101.52 mm |
Teža | 25g | 7g | 37g |
Mikrokrmilnik Atmega2560 PDF: ATmega2560
Elektronska shema R3 verzija PDF: povezava
Vsak od 54 digitalnih pinov na Mega lahko uporabljamo kot vhod ali izhod z uporabo funkcij pinMode (), digitalWrite () in digitalRead (). Delujejo pri napetosti 5 voltov. Vsak pin lahko zagotavlja ali prejema 20 mA kot priporočeno delovno stanje in ima notranji odpornik pull-up (privzeto izključen) 20-50 k ohmov. Maksimalna vrednost, ki je ne smemo preseči, je 40mA, da se izognemo trajni škodi mikrokontrolerja.
Poleg tega imajo nekateri pinovi specializirane funkcije:
Plošča Mega 2560 ima veliko možnosti za komunikacijo s računalnikom, drugo ploščo ali drugimi mikrokontrolerji. ATmega2560 nudi štiri strojne UART-e za serijsko komunikacijo TTL (5V). Na plošči je ATmega16U2 (na revizijah 1 in 2 plošč ATmega 8U2) ki preko USB prenaša enega od teh in zagotavlja virtualni com vrata za programsko opremo na računalniku (računalniki z okoljem Windows bodo potrebovali datoteko .inf, vendar bodo računalniki OSX in Linux ploščo avtomatično prepoznali kot vrata COM). Programsko okolje Arduino (IDE) vključuje serijski monitor, ki omogoča preprosto pošiljanje in prejemanje besedilnih podatkov med ploščo in računalnikom. LED diode RX in TX na plošči bodo utripale, ko se podatki prenašajo preko čipa ATmega8U2/ATmega16U2 in USB povezave s računalnikom (ne pa za serijsko komunikacijo na pinih 0 in 1).
Knjižnica SoftwareSerial omogoča serijsko komunikacijo na katerikoli od digitalnih pinov Mega 2560.
Mega 2560 tudi podpira komunikacijo TWI in SPI. Programsko okolje Arduino (IDE) vključuje knjižnico Wire za poenostavitev uporabe TWI vodov; glej dokumentacijo za podrobnosti. Za komunikacijo SPI uporabite knjižnico SPI.
Piškotek | Trajanje | Opis |
---|---|---|
__stripe_mid | 1 year | Stripe sets this cookie cookie to process payments. |
__stripe_sid | 30 minutes | Stripe sets this cookie cookie to process payments. |
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category . |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | This cookie is used by the website's WordPress theme. It allows the website owner to implement or change the website's content in real-time. |
PH_HPXY_CHECK | session | This cookie is used to save the information about the current session. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Piškotek | Trajanje | Opis |
---|---|---|
_gat | 1 minute | This cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites. |
Piškotek | Trajanje | Opis |
---|---|---|
_ga | 2 years | The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors. |
_gid | 1 day | Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously. |
CONSENT | 2 years | YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data. |
Piškotek | Trajanje | Opis |
---|---|---|
VISITOR_INFO1_LIVE | 5 months 27 days | A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface. |
YSC | session | YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt-remote-device-id | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt.innertube::nextId | never | This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen. |
yt.innertube::requests | never | This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen. |
Piškotek | Trajanje | Opis |
---|---|---|
m | 2 years | No description available. |
woodmart_recently_viewed_products | session | No description |