Go Down

Topic: Standalone USB communications (Read 4 times) previous topic - next topic

jtw11

#10
Oct 15, 2012, 12:35 am Last Edit: Oct 15, 2012, 12:43 am by jtw11 Reason: 1
So looking in the IDE, under programming is the AVR ISP mkII, as Crossroads recommended. So, using one of these and the IDE - you simple open up your sketch in the IDE, connect to the ICSP header using the ISP and flash away?

...and flashing sketches in this way means no bootloader correct, thus freeing up more space for the sketch? As there is no bootloader, do any changes need to be made to the sketch, or does the compiler still add in all the bits you miss out in the IDE.

Now correct? :-)

CrossRoads

If the chip had a bootloader installed at some point, then all fuses will have been programmed for correct operation.

File: Upload Using Programmer does not change those.
This is evidenced by loading a sketch into a brand new chip using File: Upload Using Programmer,  at which point the sketch doesn't run well at all.
Burning a bootloader, and then loading a sketch via File: Upload Using Programmer, everything runs normally.
This wipes out the bootloader code, and the sketch starts immediately after a reset.
The same .hex file for the sketch is uploaded either way.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

jtw11

I assume by not being corrected on my last post I was correct in terms of connecting things up? Please confirm, just so I'm going through this step by step in my mind and not building on incorrect knowledge,

Im afraid I'm not with you on your last post... Fuses and .hex files are not things I've ever changed or worked with, I can't say I know what they are.

CrossRoads

Yes, the normal sketch is loaded, no change is needed.  Bootloader is not loaded, you gain a little Flash memory.
MKii connects the ICSP header. Board must be powered - MKiid does not provide power.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

jtw11

Okay, good - look's like I understand up to where we are. My board will be externally powered anyhow, so it's not a problem - thanks for the heads up!

1) Now, just taken a look on the RS site to go and collect some 1284s, however - there is a 1284P-PU model, and a 1284-PU model. In your picture it seems you're using a 1284P-PU, is there however a difference that will matter in this application?

2) Also, back on the subject of fuses and .hex files - i've done a little reading, it seems that fuses are just bits of data stored on the chip, used to define certain configurations, internal vs external oscillator, clock scalars etc. Fuses seems to be a time from the black and white days when one time programmable chips were used, and these were indeed little strips inside the chip that must be burned out by applying current to them etc. Correct?

As for .hex files, is this the binary code file that the compiler writes and flashes to the chip? So what you're saying is, whether there is a bootloader or not, the .hex file remains the same - the bootloader is there simply to support USB.

3) Reverting back to your post that I did not, but I believe now do understand - to set these fuses correctly, I must put the bootloader on the chip? Then when I flash a sketch using the programmer, the bootloader itself is overwritten - but the fuse settings remain the same, as a sketch has no influence upon the fuse settings?


Go Up