Seems a popular choice and able to program larger devices such as the Mega2560 There’s a jumper to select 3V3 or 5V – make sure you use it!!! USBasp main page: https://www.fischl.de/usbasp/ Installing Windows Driver On windows you need to install a driver for it. Windows driver page: https://zadig.akeo.ie/ Its a run the exe program, […]
All posts by
Program won’t run
Waiting for USB Serial Are you using this with your Serial.begin command on an Arduino with USB serial? We found on the MKR GSM 1400 and Arduino Micro this would cause the program to not run if the Arduino serial monitor was not open! Doing this fixed it:
Soft Reset
LED Pin
Always given the IO pin define: LED_BUILTIN Will be automatically set as an output
MKR GSM 1400
Product page: https://store.arduino.cc/mkr-gsm-1400 Arduino guide page https://www.arduino.cc/en/Guide/MKRGSM1400 Arduino GSM Library: https://www.arduino.cc/en/Reference/MKRGSM https://github.com/arduino-libraries/MKRGSM Schematic: https://content.arduino.cc/assets/MKRGSM_V2.2_sch.pdf GSM Specs 3G with 2G fallback Serial ports USB connector – virtual serial port using the Serial object Serial1 – Hardware serial port on pins 13/14, instead Reset button Reset button causes the microcontroller to reset and resets USB communication. IO […]
Registers
Setting microcontroller registers directly Examples Reading microcontroller registers directly Examples
Arduino Mega2560
https://store.arduino.cc/mega-2560-r3 Microcontroller: ATmega2560https://www.microchip.com/wwwproducts/en/atmega2560 Power Power in: From the USB connectors (5V) or the DC plug (7-12V) 5V reg: LD1117S50CTR, 2%, 1V dropout, 800mA output current rated IO Pins IO voltage: 5V IO pin high voltage (for VCC = 5V): min 0.6VCC to max VCC + 0.5So digital IO pins are compatible with 3.3V input signals. IO […]
Disable interrupts
9 bit data, mark space parity
The Atmega supports 9 bit data, but the Arduino library doesn’t. Your only option using it (at least currently) is odd or even parity for the 9th data bit, there is no mark of space parity made available in via the library. This is a problem when communicating on say RS485 busses where mark and […]
UART RX
Clearing the incoming Serial buffer The flush() method only clears the transmit buffer, it has no effect on the rx buffer. This code will clear the receive buffer: