Comments (23)
Hi!
I've never experienced any issues while uploading using a USB to serial adapter. Do you have another chip/board to test with? You might want to double check that the fuses is correct
from megacore.
I'm stuck, still no progress...:( Bootloader don't want to write the code into the chip.
- I tried 3 another Atmega128A chips and 1 another PC.
- LED on PB5 is flashing so bootloader is in place and working.
- USB-UART - I tried CH340 and CP2102 based devices. They work well with Atmega328 boards.
- UART connection seems also working as avrdude starting upload and can read chip signature
- 2x100nF caps Vcc-Gnd are in place, Reset pull-up 10k (I tried also 47k as mentioned in datasheet), 100nF cap on DTR to Reset line
- Fuses:
LFUSE - 0x3F
HFUSE - 0xC6
EFUSE - 0xFF
LOCK - 0x0F - I tried with HFUSE 0xC4 (I found that bootloader starts from 0xFC00) and LOCK 0x3F (fully unlocked) - no result.
- I noted that upload starts even without DTR signal - usually other boards waiting for LOW on DTR line or manual Reset to start upload - looks strange
Here is the schematics I use: https://easyeda.com/normal/Schematic-daa7aab244404e378c8103818bf43c53
Any other ideas?
from megacore.
Do I have any chance to get some feedback?
from megacore.
I'm sorry, but I've been on business trip for a whole week. I'll dig into it in a couple of days
from megacore.
I'm not able to view the EasyEDA schematic. All I see is the logo.. please post a picture the schematic instead. A photo of your actual board would also be nice 🙂
Like I've already mentioned; I've never seen this before. Using USB to serial uploading have always worked perfectly without any errors. BTW what kind of programmer are you using?
from megacore.
Hi! I'm happy that you are here again😊
Here is my schematic:
And here is the board itself with some marks:
As you may see there is no USB-UART chip on it so far, so I used external adapters on CP2102 and CH340 for serial connection.
I'm using USBASP for flashing and fuses setting.
from megacore.
hmm. I don't see any obvious hardware issues. Your schematic looks correct. Can you get avrdude to verify the current fuse settings, both low, high, extended and lockfuse?
BTW have you disconnected the programmer when uploading with the USB to serial adapter?
from megacore.
Here are the fuses which I found in the chip after MegaCore installation: Low = 0xBF, High = 0xC6, Ext = 0xFF, Lock = 0x0F.
Bootloader settings I choose in Arduino IDE: Atmega128, BOD = 2.7V, Clock = Ext. 16MHz, LTO disabled.
LED on PB5 is flashing.
Serial itself is working well, I checked it with AnalogReadSerial example sketch.
But the same behavior during sketch upload by Serial:
Reading | ################################################## | 100% 0.68s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x0c
avrdude: verification error; content mismatchavrdude done. Thank you.
the selected serial port
does not exist or your board is not connected
And yes, I disconnected a programmer when uploading by UART
from megacore.
And what about DTR behaviour? Is it normal if bootloader starting to receive data even without DTR line?
from megacore.
Optiboot is able to start receiving data without the DTR line, but only once. After a program is received, it will never stay in bootloader mode forever, like it does when you have just burned the bootloader.
from megacore.
If you want you can try to use the older version of optiboot to see if it works better. This bootloader was "shipped" with MegaCore v1.0.1
from megacore.
I'm here back again! The same with 1.0.1 and all other versions.
You can see how it looks here: https://youtu.be/W3Efb8uDyqI
Also I found similar behaviour with your SerialReadWrite sketch. It runs, serial connection is working, but it can't write anything to the Flash. Here is how it works: https://youtu.be/45vlQO1n-Yg, and here is how the Flash dump looks after: https://youtu.be/F0FbI3GkcaA.
What do you think?
from megacore.
You're not able to write to the flash memory without the bootloader installed. I have no idea why uploading using Serial doesn't work. @majekw do you have any idea why this happen?
from megacore.
Tried SerialReadWrite sketch compiled with bootloader - the same result - it can not write to the flash
from megacore.
Hi @majekw, may be you can help me with my issue? Still no progress and I will appreciate any ideas…
from megacore.
SOLVED!
Just switched from USBISP to AVRISP Mk2 programmer.
from megacore.
Really?!
from megacore.
You need to re-program you USBasp and check for sure. I use the USBasp as one of my main programmers, and it has never failed me.
from megacore.
What usbisp are you using. Is it the chinese version. If so you should take a look at this git i fixed mine with it. https://github.com/aleh/usbisp
from megacore.
Better late than never :-)
I also heard about some USBasp which have problems with devices with more flash. I'm glad that this is not bootloader problem, because everything from description looked fine.
from megacore.
Yes, probably it has old firmware. But I was confused as it looked like both bootloader and USBasp works properly - LED on PB5 flashed and I had no problems with loading my software (~70kB) through this USBasp... So anyway thanks to everybody for support!
from megacore.
I had the same problem getting that Verification error and content mismatch all the time for code above 50 bytes (Blink code works fine), I m using USBasp programmer, So should I buy the new one?
Thank You.
from megacore.
I had the same problem getting that Verification error and content mismatch all the time for code above 50 bytes (Blink code works fine), I m using USBasp programmer, So should I buy the new one?
Thank You.
I switched to AVRIsp mkII programmer - works fine for me, no issues.
from megacore.
Related Issues (20)
- ATmega 128 I2C doesn't work HOT 2
- Incorrect clock timing HOT 1
- How to wake up from sleep using WDT reset? (atmega64) HOT 3
- arduino framework does'nt work on ATmega128 HOT 2
- Trouble uploading sketch to Arduino Mega2560 after burning bootloader HOT 1
- unable to burn bootloader for mega2560 HOT 40
- stk500v2 bootloader potential issues HOT 4
- To adopt urboot for MegaCore HOT 2
- Is it possible to program with FT232 programming? Is there a schematic drawing available? HOT 5
- Customizable LED_BUILTIN HOT 4
- Arduino Mega OTEthernet not working HOT 6
- generation of the file .hex HOT 11
- cannot be compiled when using the Wire library HOT 5
- Cannot upload sketch to mega without bootloader using arduinoISP HOT 5
- Original Mega 2560 bootloader HOT 4
- Doesn't work on arduino mega 2560 (clone) HOT 2
- ArduinoOTA problems on Mega2560 using Megacore >= 3 HOT 2
- Erase bootloader
- Support for multiple UARTs at same time?
- ATmega64a serial upload problem HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megacore.