Show Posts
|
|
Pages: [1] 2 3 ... 25
|
|
2
|
Using Arduino / Microcontrollers / Re: Using Arduino Uno TX and RX pins
|
on: June 16, 2013, 04:36:26 pm
|
mr_johansen, is this the USB-to-Serial adapter you're using?  If so I'm not sure it will work with an Uno. The Rx pin on the Uno's processor has a 1k pull-up (via the on-board USB adapter), which any external adapter has to overcome. And I don't think the Arduino USB2Serial "Light" will be able to, because it's Tx pin is connected via a 500 Ohm resistance meaning it won't be able to pull the Uno's Rx pin below the threshold for logic-zero.
|
|
|
|
|
3
|
Using Arduino / Microcontrollers / Re: ATMega 328 Breakout Board
|
on: June 10, 2013, 05:51:08 am
|
I want to do some low power (long battery life) stuff so I need to have a minimal circuit (no LEDs, USB, etc) and I was looking for a board to build this on.
I have been using Sparkfun's Pro-Mini for exactly this purpose. They're easy to get hold of, and quite cheap at $10. To get below ~1mA you just need to cut one trace to disconnect the regulator and power LED. With this small modification (and appropriate programming) you can get the current consumption below 3uA. The modification can be undone be connecting the two VCC contacts together.  Sparkfun have revised the PCB layout since I made this picture, but the cut is still in approximately the same spot. The Pro Micro can also be modified, although it's slightly harder to do.
|
|
|
|
|
4
|
Using Arduino / Microcontrollers / Re: Moving to something smaller
|
on: May 13, 2013, 07:44:32 pm
|
|
Sparkfun make a "Mega Pro Mini" board. It's based on the same chip as the Mega2560, so you wouldn't need to alter your code. Potential disadvantages are that it runs at 8MHz and 3.3V instead of the usual 16MHz and 5V. It also uses unusual connectors, and needs an FTDI adapter to program.
A number of people have made Arduinos based on the ATmega1284 chip which might be ideal for your application, but I don't know how you'd obtain one of these boards. The 1284 chip is available in a DIL package, so you could make your own on stripboard.
|
|
|
|
|
6
|
Using Arduino / Microcontrollers / Re: Atmega328p Power Saving Techniques
|
on: April 25, 2013, 12:01:39 pm
|
The "power_all_disable()" does that.
Are you sure? The datasheet makes a point of saying that the ADC must be disabled (ADCSRA) before being shutdown (PRR). You commented that disabling the ADC doesn't seem to do anything, but it should make a noticeable difference.
|
|
|
|
|
7
|
Using Arduino / Microcontrollers / Re: Atmega328p Power Saving Techniques
|
on: April 25, 2013, 11:04:45 am
|
|
Are you sure the watchdog is being set correctly? Normally you need to set WDCE before changing WDE or the prescaler bits.
BTW, after the watchdog interrupt WDIF is cleared automatically (so you don't need to do it in the ISR). Meanwhile the WDT is still running, and may reset the processor before the 4s delay finishes (not that it matters much in this case).
I also noticed that you're not switching the ADC off after disabling it (power reduction register, PRR).
|
|
|
|
|
11
|
Using Arduino / Microcontrollers / Re: ATmega328P targeted at low-power battery use: help needed with baby steps!
|
on: April 16, 2013, 03:47:47 pm
|
Anyone got a precompiled 1MHz-friendly ATmega328P bootloader.hex file?
Here you go. They're untested I'm afraid, but I'm using Optiboot on other boards at non-standard frequencies and baud-rates with no problems. atmega328_1a.hex (Optiboot for 9600baud at 1MHz) :107E0000112484B714BE81FFE6D085E08093810001 :107E100082E08093C00088E18093C10086E0809377 :107E2000C2008CE08093C4008EE0BFD0259A86E02B :107E300023EC3FEF91E0309385002093840096BBC4 :107E4000B09BFECF1D9AA8958150A9F7EE24FF2480 :107E5000AA24A394B5E0CB2EA1E1BA2EF3E0DF2E45 :107E600098D0813461F495D0082FA5D0023829F13B :107E7000013811F485E001C083E083D07FC08234F3 :107E800011F484E103C0853419F485E09CD076C0F8 :107E9000853579F47ED0E82EFF247BD0082F10E0C2 :107EA000102F00270E291F29000F111F84D07801E1 :107EB00065C0863521F484E086D080E0DECF84364C :107EC00009F040C066D065D0082F63D080E0E81686 :107ED00080E7F80618F4F701D7BEE895C0E0D1E0D6 :107EE00058D089930C17E1F7F0E0EF16F0E7FF06A2 :107EF00018F0F701D7BEE8955ED007B600FCFDCFBD :107F0000A701A0E0B1E02C9130E011968C9111977F :107F100090E0982F8827822B932B1296FA010C0160 :107F2000A7BEE89511244E5F5F4FF1E0A038BF0770 :107F300051F7F701C7BEE89507B600FCFDCFB7BE05 :107F4000E8951CC0843761F424D023D0082F21D0B9 :107F500032D0F70185917F0114D00150D1F70EC0C6 :107F6000853739F428D08EE10CD085E90AD08FE02E :107F700084CF813511F488E018D01DD080E101D084 :107F80006FCF982F8091C00085FFFCCF9093C600E3 :107F900008958091C00087FFFCCF8091C00084FDD0 :107FA00001C0A8958091C6000895E0E6F0E098E150 :107FB000908380830895EDDF803219F088E0F5DF4B :107FC000FFCF84E1DECF1F93182FE3DF1150E9F7D5 :107FD000F2DF1F910895282E80E0E7DFEE27FF27CC :027FE000099402 :027FFE0000057C :0400000300007E007B :00000001FF
atmega328_1b.hex (Optiboot for 4800baud at 1MHz) :107E0000112484B714BE81FFE6D085E08093810001 :107E100082E08093C00088E18093C10086E0809377 :107E2000C20089E18093C4008EE0BFD0259A86E02D :107E300023EC3FEF91E0309385002093840096BBC4 :107E4000B09BFECF1D9AA8958150A9F7EE24FF2480 :107E5000AA24A394B5E0CB2EA1E1BA2EF3E0DF2E45 :107E600098D0813461F495D0082FA5D0023829F13B :107E7000013811F485E001C083E083D07FC08234F3 :107E800011F484E103C0853419F485E09CD076C0F8 :107E9000853579F47ED0E82EFF247BD0082F10E0C2 :107EA000102F00270E291F29000F111F84D07801E1 :107EB00065C0863521F484E086D080E0DECF84364C :107EC00009F040C066D065D0082F63D080E0E81686 :107ED00080E7F80618F4F701D7BEE895C0E0D1E0D6 :107EE00058D089930C17E1F7F0E0EF16F0E7FF06A2 :107EF00018F0F701D7BEE8955ED007B600FCFDCFBD :107F0000A701A0E0B1E02C9130E011968C9111977F :107F100090E0982F8827822B932B1296FA010C0160 :107F2000A7BEE89511244E5F5F4FF1E0A038BF0770 :107F300051F7F701C7BEE89507B600FCFDCFB7BE05 :107F4000E8951CC0843761F424D023D0082F21D0B9 :107F500032D0F70185917F0114D00150D1F70EC0C6 :107F6000853739F428D08EE10CD085E90AD08FE02E :107F700084CF813511F488E018D01DD080E101D084 :107F80006FCF982F8091C00085FFFCCF9093C600E3 :107F900008958091C00087FFFCCF8091C00084FDD0 :107FA00001C0A8958091C6000895E0E6F0E098E150 :107FB000908380830895EDDF803219F088E0F5DF4B :107FC000FFCF84E1DECF1F93182FE3DF1150E9F7D5 :107FD000F2DF1F910895282E80E0E7DFEE27FF27CC :027FE000099402 :027FFE0000057C :0400000300007E007B :00000001FF
boards.txt entries: atmega328_1mhz_9600baud.name=Optiboot 1MHz 9600baud atmega328_1mhz_9600baud.upload.protocol=arduino atmega328_1mhz_9600baud.upload.maximum_size=32256 atmega328_1mhz_9600baud.upload.speed=9600 atmega328_1mhz_9600baud.bootloader.low_fuses=0xff atmega328_1mhz_9600baud.bootloader.high_fuses=0xde atmega328_1mhz_9600baud.bootloader.extended_fuses=0x05 atmega328_1mhz_9600baud.bootloader.path=optiboot_v50 atmega328_1mhz_9600baud.bootloader.file=atmega328_1a.hex atmega328_1mhz_9600baud.bootloader.unlock_bits=0x3F atmega328_1mhz_9600baud.bootloader.lock_bits=0x2F atmega328_1mhz_9600baud.build.mcu=atmega328p atmega328_1mhz_9600baud.build.f_cpu=1000000L atmega328_1mhz_9600baud.build.core=arduino atmega328_1mhz_9600baud.build.variant=standard
atmega328_1mhz_4800baud.name=Optiboot 1MHz 4800baud atmega328_1mhz_4800baud.upload.protocol=arduino atmega328_1mhz_4800baud.upload.maximum_size=32256 atmega328_1mhz_4800baud.upload.speed=4800 atmega328_1mhz_4800baud.bootloader.low_fuses=0xff atmega328_1mhz_4800baud.bootloader.high_fuses=0xde atmega328_1mhz_4800baud.bootloader.extended_fuses=0x05 atmega328_1mhz_4800baud.bootloader.path=optiboot_v50 atmega328_1mhz_4800baud.bootloader.file=atmega328_1b.hex atmega328_1mhz_4800baud.bootloader.unlock_bits=0x3F atmega328_1mhz_4800baud.bootloader.lock_bits=0x2F atmega328_1mhz_4800baud.build.mcu=atmega328p atmega328_1mhz_4800baud.build.f_cpu=1000000L atmega328_1mhz_4800baud.build.core=arduino atmega328_1mhz_4800baud.build.variant=standard
|
|
|
|
|
12
|
Using Arduino / Microcontrollers / Re: Arduino Leo compared to a computer.
|
on: April 10, 2013, 09:35:36 am
|
|
In terms of home computers I guess you could compare the Leonardo to the 6502 or Z80 based computers which appeared in the early 80s, such as the BBC Micro (1981) or Sinclair Spectrum (1982). Although they usually had more RAM, commonly 16-64k, that memory also had to contain the program (and the video memory). The OS was in ROM, so did not use up much RAM. So the overall memory constrains were similar. They were a good bit slower than an Arduino though, running at 2-4 MHz. 'C' compilers were not readily available so most of use used Basic (which was slow to run) and Assembler (which was slow to write).
In cost they were absolutely not comparable to an Arduino. Even the Spectrum, one of the cheaper home computers of the time, was well over a hundred pounds. Computers with user-accessible IO and ADCs were considerably more. In fact I can't think of any programmable computing device which has ever been cheaper than an Arduino...
|
|
|
|
|
13
|
Using Arduino / Microcontrollers / Re: Question on difference between bootloaders?
|
on: April 09, 2013, 02:36:58 pm
|
"Flashing a chip" and "running a bootloader" are two different instances. You may flash a chip with "any recommended crystal value" connected to it, afaik (provided you are using a standard programming method).
The processor must be running, so the set fuse values must correspond to the crystal used during programming. Is so happens that the fuse values for 8MHz and 16MHz are the same, so in this case we can ignore the fact that we're using the "wrong" clock during programming.
|
|
|
|
|
14
|
Using Arduino / Microcontrollers / Re: Question on difference between bootloaders?
|
on: April 09, 2013, 02:26:39 pm
|
correct?
Spot on. :-) I flash Duemilanove with the Arduino as ISP sketch.. ...wire up board.. make sure com port is right... choose - Arduino Pro/Pro-Mini @+3.3v & 8MHz entry from BOARDS menu.. and then choose BURN BOOTLOADER..
This will also work. However you'll need to remove your chip from the 16MHz jig and install it in the 8MHz circuit before you can test it (or create yet another new entry in boards.txt).
|
|
|
|
|
15
|
Using Arduino / Microcontrollers / Re: Question on difference between bootloaders?
|
on: April 09, 2013, 02:15:55 pm
|
that being said.. 'is' moving toward +3.3v based boards the trend? (future?).. Yes. Oo-er. That's perhaps overstating it. Fast processors have used lower voltages for many years, and even 3.3V is rather high for a modern chip. But 5V still has plenty of advantages in an Arduino. Minimalist boards based on the 32U4 chip can run off 5V USB power without a regulator. Many components require 5V or run better at 5V: audio amplifiers, buzzers, large LED displays, power transistors, relays...
|
|
|
|
|