Go Down

Topic: How to choose the chip I need? (Read 11513 times) previous topic - next topic

dc42

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


aarondc


DroidDr

Hi,

As part of my Arduino learning process:

I bought some blank 328P chips then I setup a breadboard with external crystal, caps, 328P chip etc as per this link
http://arduino.cc/en/Main/Standalone
The part about the usb-ttl adapter I did not do at that point.

I connected the proper cables to a ICSP programmer called a USBASP, available cheaply from ebay or you can build it yourself (have not tried to do that myself)

I used AVRDude command line to set the fuses to match an Arduino. CAREFUL with that. You can 'brick' your chip and reder it unusuable if you do it wrong! I initially got the right fuse settings by taking the chip from the arduino, placing it on the breadboard and used AVRDUDE to query the chip and its settings.
I also used AVRdude command line to upload a blink program and to prove it works. (without bootloader, directly through the ICSP interface)
I was also able to upload the Arduino bootloader the same way.

Then I went on the arduino software to do the same thing
http://tutorial.cytron.com.my/2011/12/19/burning-arduino-bootloader-with-avr-usbasp/
After choosing the appropriate equivalent arduino board: in my case I chose Arduino mini for the breadboard and I also tried Arduino Uno for a chip I would put on the arduino uno.
1- tools->programming->USBASP
2- tools->Burn bootloader.
by setting the output of the the software in the bottom of the screen to detailed, I was able to get all teh avrdude commands to set fuses and upload the bootloader, and that helped in my process above.

This worked perfectly and then I put the chip in my arduino ( the one I burned the booloader on with board type as arduino uno), and was able to download to it using the normal usb method after that.

After this I took a chip (burned a bootloader as an arduino mini)
I put it in my breadboard as per above, connected the arduino serial loader (usb-ttl) and was able to download to it through the arduino software.

If you are interested on any of this, I can put together detailed notes on the process/commands.




dave84


Hi,

As part of my Arduino learning process:

I bought some blank 328P chips then I setup a breadboard with external crystal, caps, 328P chip etc as per this link
http://arduino.cc/en/Main/Standalone
The part about the usb-ttl adapter I did not do at that point.

I connected the proper cables to a ICSP programmer called a USBASP, available cheaply from ebay or you can build it yourself (have not tried to do that myself)

I used AVRDude command line to set the fuses to match an Arduino. CAREFUL with that. You can 'brick' your chip and reder it unusuable if you do it wrong! I initially got the right fuse settings by taking the chip from the arduino, placing it on the breadboard and used AVRDUDE to query the chip and its settings.
I also used AVRdude command line to upload a blink program and to prove it works. (without bootloader, directly through the ICSP interface)
I was also able to upload the Arduino bootloader the same way.

Then I went on the arduino software to do the same thing
http://tutorial.cytron.com.my/2011/12/19/burning-arduino-bootloader-with-avr-usbasp/
After choosing the appropriate equivalent arduino board: in my case I chose Arduino mini for the breadboard and I also tried Arduino Uno for a chip I would put on the arduino uno.
1- tools->programming->USBASP
2- tools->Burn bootloader.
by setting the output of the the software in the bottom of the screen to detailed, I was able to get all teh avrdude commands to set fuses and upload the bootloader, and that helped in my process above.

This worked perfectly and then I put the chip in my arduino ( the one I burned the booloader on with board type as arduino uno), and was able to download to it using the normal usb method after that.

After this I took a chip (burned a bootloader as an arduino mini)
I put it in my breadboard as per above, connected the arduino serial loader (usb-ttl) and was able to download to it through the arduino software.

If you are interested on any of this, I can put together detailed notes on the process/commands.


Thanks for the advice, I'm fairly sure I'll be alight as dc42's link goes over setting the fuses etc and I've got a few old IDE cables lying around to make the cable and feel comfortable enough to make it, and make the programmer on protoboard.

bperrybap

My favorite small form factor boards are the teensy boards:
http://www.pjrc.com/teensy/
while you can cobble up a m328 based design for less, it is pretty hard to
do it for less by the time you add in all the costs particularly for
doing only a couple of boards, unless you happen to have many of the
needed components laying around.

The advantage of the teensy over the typical m328 based boards is that
the 32u4 has native USB. This not only allows much faster uploads
and serial communication but also the ability to emulate USB devices.

Paul's core code and IDE enhancements also makes the builds faster
and his core code is much faster at things like digitalWrite()/DigititalRead()
than the standard Arduino core.

Teensy3 is really cool if you want a much faster platform with lots more
resources or want to play around with 3v.
Also cool features like built in RTC and touch inputs.

--- bill

gv445

Hi,
When reading Attiny84 datasheet do I understand it correctly, that I can have 12 digital pins all in all to control 12 LEDs or relays?

CrossRoads

Yes.
You must use the internal oscillator to do that, and you lose Reset capability.  You are also also current limited per the notes from datasheet Table 20-1:
Notes: 1. Typical values at 25°C.
2. "Min" means the lowest value where the pin is guaranteed to be read as high.
3. "Max" means the highest value where the pin is guaranteed to be read as low.
4. Not tested in production.
5. Although each I/O port can sink more than the test conditions (10 mA at VCC = 5V, 5 mA at VCC = 3V) under steady state
conditions (non-transient), the sum of all IOL (for all ports) should not exceed 60 mA. If IOL exceeds the test conditions, VOL
may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.
6. Although each I/O port can source more than the test conditions (10 mA at VCC = 5V, 5 mA at VCC = 3V) under steady state
conditions (non-transient), the sum of all IOH (for all ports) should not exceed 60 mA. If IOH exceeds the test condition, VOH
may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition.
7. The RESET pin must tolerate high voltages when entering and operating in programming modes and, as a consequence,
has a weak drive strength as compared to regular I/O pins. See Figure 21-87, Figure 21-88, Figure 21-89, and Figure 21-90
(starting on page 226).
8. These are test limits, which account for leakage currents of the test environment. Actual device leakage currents are lower.
9. Values are with external clock using methods described in "Minimizing Power Consumption" on page 35. Power Reduction
is enabled (PRR = 0xFF) and there is no I/O drive.
10. BOD Disabled
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up