Using arduino UNO(mac) i am trying to upload boot loader to the atmega328 where the chip is on a bread board, and connected to the UNO board tx-tx, rx-rx, vcc,gnd ,reset .
So i am trying to upload a boot loader by adding to the boards.txt file the atmega on a breadboard 8mhz , and choose it from boards menu.
than when i try to burn boot loader he says after 0 seconds :
did not find any USB device "usb"
than i change the programmer from - AVR ISP mkii to- AVR ISP
it starts then, and after 6-7 seconds of try he fails saying:
programmer is not responding
I dont know what am i doing wrong, i have also tried with a oscillator,or without it, nothing works.
maybe the fact that its a mac has todo with it ?
To access that portion of memory you need to use the arduino as an ISP (in-system programmer).
The use of USB to program an arduino chip is enabled by the bootloader you are trying to put on.
The usual way is to program a chip directly is using an ISP.
Have a look at the setup here:
http://arduino.cc/en/Tutorial/ArduinoISP
Another good resource for an advanced build is this:
How to Build an AVR Development Board: http://youtu.be/ncobWc61wL4
He explains what he is doing as he goes so it is really easy to follow and he talks about the programming process.
Related
Hello and happy holiday to all
I am using platformio for an arduino project for the first time. I have purchased this ESP32 borad:
EC Buying ESP32-DevKitC Development Board ,ESP32 Development Board Equipped with WROOM-32D Module Integrated WiFi Bluetooth Module Microprocessor Interface SPI I2C I2S Suitable for Arduino
I am new to all this and need to know what board I should pick in PLATFORMIO for this board. I have loaded the core 32 from Espressif 32 and have the large list of ESP32 boards.
just want to make sure to pick the correct board to match the one purchased. Here is also the link to amazon on the board purchased.
https://www.amazon.com/dp/B0B64SD16T?psc=1&ref=ppx_yo2ov_dt_b_product_details
Thanks to all you wonderful people who can help.
I have not tried any boards listed as I did not what to damage this new board.
You won't damage an ESP32 by choosing the wrong PlatformIO board. The worst that will happen is that you won't be able to flash your program to the board, or it won't run correctly when it's flashed. While it's not impossible to brick an ESP32 by configuring security options, that's not something PlatformIO is going accidentally do to your board.
You can search the list of available boards on the web and look for a close match.
The most important thing is to get the correct processor type - figure out whether you have ESP32, ESP32-S2, ESP32-S3, ESP32-C3 (or eventually some other kind of ESP32). Only consider PlatformIO boards for that specific CPU. Then look for the size of the flash storage. Usually any board that matches that spec will work.
esptool.py, the program PlatformIO uses to flash the firmware to the board, will detect the CPU type, so if you have an ESP32-S2 and try to flash code for an ESP32 to it, it will detect this and report an error.
In your case you might try the generic Espressif ESP32 Dev Module:
[env:esp32dev]
platform = espressif32
board = esp32dev
If your first try doesn't work, it's safe to try another.
I was troubleshooting why Serial1 was always throwing undefined errors in sketches I was trying to run when I found a solution posted online for a slightly different board that suggested this line:
HardwareSerial Serial1(2);
I uploaded it and now the Arduino doesn't show up in the IDE, did I remap it's serial communications? Why is this possible!
Is there any hardware factory reset option available on these boards? Did I just brick my device?
edit: It seems the STM32Cube programmer app can be used to communicate with the device but I'm not sure where to get the original firmware to flash. https://imgur.com/a/LbiHenf
Assuming from the tag in your question, I guess you have an STM32 – (BluePill) Development Board (STM32F103C8).
If you think that your board is not handling serial communication properly then you might consider burning bootloader to your board. This will reset the complete configuration of your board.
There are many ways in which you can burn bootloader to your board.
Using another Arduino board like Uno / Nano / Mega
Using an FTDI USB to TTL Serial Adapter.
You might want to go through tutorials list below:
Getting Started with STM32 using Arduino IDE: Blinking LED
Programming STM32F103C8 Board using USB Port
I am using arduino uno r3 board and arduino 1.6.5 on windows 8. When Itried to upload my program on ATMEGA328 microcontroller it is showing:
avrdude:stk500_getsync not in sync:resp=0x87.
help me to solve this error
This boils down to 3 problems usually..
The bootload on the chip is missing (unlikely if you purchased the board from Arduino).
The serial connection between the arduino and the computer is disconnected or interrupted.
You've simply selected the wrong board type or port when programming, and thus the IDE is searching for a signal that the arduino isn't coming back with.
This problem is most likely due to option 3, however it can occur in odd situations especially on the Arduino Micro where the board does all USB comms on chip and can be flooded by main without an appropriate delay to the point it can't communicate with the IDE. However this is just most likely a bad board selection or a bad port selection.
I've tried many things but this worked for me. If you have a working Arduino lying around (in my case Uno) you can use it as an intermediate in-system programmer (ISP).
Follow this guide to first load the ISP sketch into your working Arduino.
Once you are done, for your non-working Arduino, select from the Tools > Programmer menu and choose Arduino as ISP, and set Board and Processor accordingly. To program choose Sketch > Upload using programmer.
Hope this works.
I think the reason that this work is that it will bypass the CH340/FTDI chip, and all those synchronization issue. Given that that is your problem.
I've recently built an Arduino-controlled robot(4WD platform) using a beginner's kit.
After uploading compiled program into Arduino, I was able to get 4WD motors working.
But when I disconnect the USB cable after successful "uploading" and I turn on the mobile platform switch, it doesn't move a bit.
What procedure is required for getting it to move (I mean.. having machine language permanently stored in AVR microcontroller's memory) without again connecting USB cable to Arduino and uploading program after I find the code working so that just turning on the switch of the robot make it start to move as programmed?
It REALLY sounds like a power issue.
-What is powering your arduino when the USB is disconnected?
The USB from a computer is often pretty strong (hight current) and a 9V battery might not cut it for electric motors and such.
If this is the problem you may want to try a more powerfull battery setup, like 4 AAs.
You may go the LiPo battery route from a source like Adafruit or Sparkfun. Then the problem is that a LiPo battery only produces 3.3V. Ugh, you'll need an circuit to bump the voltage to 5 (which Adafruit sells) and a charger. This may be your best choice if you're planning to use the robot a lot.
I downloaded several software that provide virtual COM ports. These COM ports do appear in the Device Manager and can be selected for upload from the Arduino IDE, menu Tools -> Serial Port -> COM3. It starts uploading and reaches 90% and then it either times out or just does nothing.
I want to upload onto the virtual COM port so I could then read the compilation output files in another program. I don't want to use my Arduino at all, and I don't want to manually get the verbose output files when uploading. This problem doesn't happen when I upload on the real Arduino.
The application should work on all platforms. This task seems easy on Linux, and I am facing the stated problem on Windows and any help with Mac would also be useful.
The application will be an educational tool for hardware simulation and visualization trying to give a more hands-on experience for users than other simulators out there. So may be this will give you an idea of why I want to do so.
How can I get started?
I think you might be assuming that uploading code to Arduino is one-way communications: this would be like putting strawberries in a blender, and a Daquiri comes out. If that was true, you could just take whatever the IDE dumps to the serial port, save it to a file, and you have an Arduino binary. (Skip to TL;DR if not interested in details. Upshot: this assumption is not correct).
The 1-way communication assumption is not entirely correct: there is a program on the Arduino (called "a bootloader") which is responsible for communicating with the programmer ("programmer": a program that programs the Arduino, assume it is the Arduino IDE for now). In their most "natural" state, the Arduino CPUs cannot be programmed across serial lines. Rather these chips are programmed either via the in system programming (ISP) or via the JTAG protocol. The bootloader is a program that runs on an Arduino CPU and loading of sketches/programs over the serial port. This program runs at startup and looks for programming commands over the serial port.
If it discovers that a programmer is trying to communicate programming information, it will read the compiled Arduino binary coming over the serial link, store it in flash memory, send it back to over the serial link for verification, and if everything is successful, exit and launch the stored sketch. If no programming information appears on the serial port, that is, no programmer is trying to write a new sketch, then the bootloader simply quits and launches the program already stored in flash.
TL;DR: In order to implement a pseudo-Arduino on your serial port you must write a program some code that simulates an Arduino (bootloader) on the other end of your virtual serial port. So when a programmer/IDE says to Arduino "are you there?" your program will respond "yes!", just like an Arduino would.
The default Arduino bootloader is STK-500 compatible: that means that it implements STK-500 commands - the reference for which can be found here. If you decide to do this, then the easiest thing might be to start with an existing bootloader, such as Arduino's or AdaFruit's (there are others too), and modify it. Such a bootloader would have all the commands already implemented, and since it is written in C (I wouldn't choose an assembly bootloader to modify :), it should be easy enough to modify.
Alternatively, you might decide that STK-500 is too difficult to implement. If this is the case, you can use any programmer protocol that Avrdude supports: Avrdude is a program for programming AVR chips, and Arduino IDE uses Avrdude internally to send the sketch to the Arduino. If you do this, then you'd have to change the settings in Arduino IDE for which programmer you are using.
Personally, I think STK-500 compatible is the best option for this, but YMMV.