Show Posts
Pages: [1] 2 3 ... 43
1  Using Arduino / Microcontrollers / Re: Updating DFU on Arduino Uno SMD v3 on: Today at 07:47:27 pm
If you have another Arduino, you could use that as Arduino as ISP programmer.
2  Using Arduino / Microcontrollers / Re: Strange problem w/ ATTiny85 (MOSI/MISO interference) on: Today at 07:45:15 pm
Here are some examples of loading pins to support ISP programming.

http://www.kanda.com/avr-isp-circuits.html

3  Using Arduino / Microcontrollers / Re: LEDFader (backgrounded, non-blocking PWM fader) on 328P-on-a-breadboard flickers on: Today at 08:43:39 am
The slowness prevails- setting #define FADE_TIME 1000 still takes a good 16 seconds. Any further good ideas?

It may be the mega328p fuse bit settings may not be set correctly.  I'm sure you did, but I'll ask anyway, did you burn bootloader to set the fuse bits?  This is necessary to set the proper clock rates for 8MHz.

Also, just to verify pin D3 (PWM) is physical chip pin-5.
4  Using Arduino / Microcontrollers / Re: Programming a Micro with a Micro on: Today at 07:32:58 am
Yes, I've used a Micro as ISP before, see http://forum.arduino.cc/index.php?topic=156863.msg1178400#msg1178400.

5  Using Arduino / Microcontrollers / Re: core13: An Arduino core for the Attiny13 *testers wanted* on: Today at 03:04:49 am
Oh, and I found that PROGMEM  prog_uint8_t... and ... pgm_read_byte_near(... seem to crash the program, that was my main way of saving ram, but ended up losing 8 bytes after I took the lines out smiley-sad

You must be using IDE 1.5.7?  Or updated your AVRToolChain.  The newer avr-gcc changed two things.
1) You need to add the 'const' keyword to your PROGMEM variables.
2) They dropped support for the prog_ typedefines.

You can edit all your code to use the newer method.  Or you could add a compatibility work-around by defining this.
Code:
#define __PROG_TYPES_COMPAT__
#include <avr/pgmspace.h>

const prog_uint8_t CIEL8[] PROGMEM = {  
0, 1, 2, 3, 4, 5, 7, 9,
12, 15, 18, 22, 27, 32, 38, 44,
51, 58, 67, 76, 86, 96, 108, 120,
134, 148, 163, 180, 197, 216, 235, 255
};

6  Using Arduino / Microcontrollers / Re: Building ATMEGA32U4 bootloader and pin 13 behavior on: September 17, 2014, 06:44:58 pm
That line can be ignored.  It's used for other types of processors.

You can use that Caterina.hex bootloader as-is without the beginning 4832 bytes.  It's a little tricky doing this.  The first time you use it the bootloader will be running continuously until you upload a sketch.  The IDE will get confused finding the COM port, but just manually press the reset button when it's ready to upload.  You just need to be aware the COM port number changes with the bootloader.

Alternatively, you could build the basic Blink sketch and edit the Blink.cpp.hex file.
Remove the last line end-of-file marker.
Code:
:00000001FF

Then append your Caterina.hex file to the end of it.  Then used the combined hex file as your bootloader.

This will allow it to initially have a running USB link for the Auto-bootloader to run when you upload from the IDE.
This is why the production Caterina-Leonardo.hex files have the combined sketch and booloader all in one file.

7  Using Arduino / Microcontrollers / Re: LEDFader (backgrounded, non-blocking PWM fader) on 328P-on-a-breadboard flickers on: September 17, 2014, 03:22:40 pm
I ran the LEDFader library on an attiny85 @8MHz and it runs fine.  I also tried it with an Arduino Pro Mini @8MHz and works fine.

It's probably some loose or bad connections on the breadboard.  Try a different breadboard or changing out some wires.
8  Using Arduino / Microcontrollers / Re: attiny85 + adxl335 on: September 17, 2014, 02:40:00 pm
What CPU clock rate is your attiny85 set to?  Which tiny core are you using?
9  Using Arduino / Microcontrollers / Re: core13: An Arduino core for the Attiny13 *testers wanted* on: September 17, 2014, 01:27:12 pm
Which programmer are you using?  Chances are the default clock on the tiny13 is too slow for your programmer.  Depending on which programmer you may be able to slow it down with avrdude options.
10  Using Arduino / Microcontrollers / Re: Cheap Chinese clone: Programmer not responding on: September 17, 2014, 01:23:05 pm
Yes, there are always exceptions, but not common.  Now you are talking about design philosophy and that doesn't really help for the OP situation.  Besides, how would you handle the millions of existing boards out there with the auto-reset cap?  (not trying to criticize, just trying to make practical sense of it)

11  Using Arduino / Microcontrollers / Re: Building ATMEGA32U4 bootloader and pin 13 behavior on: September 17, 2014, 12:15:24 pm
The 4832 bytes are part of the sketch.  They are not related or any part of the bootloader.  They are for SerialUSB communication from your sketch and to allow for the auto-bootloader function.  They are located in the core files.  So they will always be there. 

Theoretically you could load a different core, like Uno, to the board and loose any USB communication from your sketch and the auto-bootloader function.  Then you will gain back around 4K of flash space, or even 8K of space if you don't need the bootloader.  In this case you would need to upload using  ICSP.

12  Using Arduino / Microcontrollers / Re: Cheap Chinese clone: Programmer not responding on: September 17, 2014, 04:33:44 am
Nope, FTDI programmers do not have an auto-reset capacitor on the DTR signal.  The only capacitors on the FTDI are used for decoupling.

The auto-reset capacitors are almost always on the main MCU board.
13  Using Arduino / Microcontrollers / Re: ATMEGA32U4 pin 13 behavior on: September 17, 2014, 03:43:09 am
To build a Caterina bootloader you will need to download the LUFA library and unzip it to a path accessible from the Caterina folder in your IDE install.  The Caterina was built on an older release of LUFA 111009.  It may work with newer LUFA releases but I think it may need modifications for that.  It's simpler to just stick with the 111009 release.

Try this download link, http://www.github.com/abcminiuser/lufa/archive/LUFA-111009.zip

I have my install paths like this:
\My Documents\Arduino\arduino-1.0.5-r2\hardware\arduino\bootloaders\caterina
\My Documents\LUFA\LUFA-111009\

You will need to edit the Makefile to define the USB VID and PID values.  See the examples in the file.  Just uncomment the ones you will use for testing.

(Note: You may need to add the IDE WinAVR \avr\bin and \avr\utils\bin to the Windows PATH)
Code:
C:\> set PATH=%PATH%;C:\Documents and Settings\User\My Documents\Arduino\arduino-1.0.5-r2\hardware\tools\avr\bin;C:\Documents and Settings\User\My Documents\Arduino\arduino-1.0.5-r2\hardware\tools\avr\utils\bin

Then from command line window run the make command:
Code:
C:\Documents and Settings\User\My Documents\Arduino\arduino-1.0.5-r2\hardware\arduino\bootloaders\caterina>make

-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling C: Descriptors.c
avr-gcc -c -mmcu=atmega32u4 -I. -gdwarf-2 -DF_CPU=16000000UL -DF_USB=16000000UL -DBOARD=BOARD_USER -DARCH=ARCH_AVR8 -DBO
OT_START_ADDR=0x7000UL -DDEVICE_VID=0x2341UL -DDEVICE_PID=0x0037UL -D USB_DEVICE_ONLY -D DEVICE_STATE_AS_GPIOR=0 -D ORDE
RED_EP_CONFIG -D FIXED_CONTROL_ENDPOINT_SIZE=8 -D FIXED_NUM_CONFIGURATIONS=1 -D USE_RAM_DESCRIPTORS -D USE_STATIC_OPTION
S="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -D NO_INTERNAL_SERIAL -D NO_DEVICE_SELF_POWER -D
 NO_DEVICE_REMOTE_WAKEUP -D NO_SOF_EVENTS -D NO_LOCK_BYTE_WRITE_SUPPORT -Os -funsigned-char -funsigned-bitfields -ffunct
ion-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,
-adhlns=./Descriptors.lst -I../../../../../../LUFA/LUFA-111009/ -std=c99 -MMD -MP -MF .dep/Descriptors.o.d Descriptors.c
 -o Descriptors.o

Linking: Caterina.elf
avr-gcc -mmcu=atmega32u4 -I. -gdwarf-2 -DF_CPU=16000000UL -DF_USB=16000000UL -DBOARD=BOARD_USER -DARCH=ARCH_AVR8 -DBOOT_START_ADDR=0x7000UL -DDEVICE_VID=0x2341UL -DDEVICE_PID=0x0037UL -D USB_DEVICE_ONLY -D DEVICE_STATE_AS_GPIOR=0 -D ORDERED_EP_CONFIG -D FIXED_CONTROL_ENDPOINT_SIZE=8 -D FIXED_NUM_CONFIGURATIONS=1 -D USE_RAM_DESCRIPTORS -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -D NO_INTERNAL_SERIAL -D NO_DEVICE_SELF_POWER -D NO_DEVICE_REMOTE_WAKEUP -D NO_SOF_EVENTS -D NO_LOCK_BYTE_WRITE_SUPPORT -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=Caterina.o -I../../../../../../LUFA/LUFA-111009/ -std=c99 -MMD -MP -MF .dep/Caterina.elf.d Caterina.o Descriptors.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/
AVR8/USBController_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.o ../../../../
../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/ConfigDescriptor.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/DeviceStandardReq.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/Events.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/HostStandardReq.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Core/USBTask.o ../../../../../../LUFA/LUFA-111009/LUFA/Drivers/USB/Class/Common/HIDParser.o --output Caterina.elf -Wl,-Map=Caterina.map,--cref -Wl,--section-start=.text=0x7000 -Wl,--relax -Wl,--gc-sections     -lm

Creating load file for Flash: Caterina.hex
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock Caterina.elf Caterina.hex

Creating load file for EEPROM: Caterina.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
        --change-section-lma .eeprom=0 --no-change-warnings -O ihex Caterina.elf Caterina.eep || exit 0

Creating Extended Listing: Caterina.lss
avr-objdump -h -S -z Caterina.elf > Caterina.lss

Creating Symbol Table: Caterina.sym
avr-nm -n Caterina.elf > Caterina.sym

Size after:
AVR Memory Usage
----------------
Device: atmega32u4

Program:    4058 bytes (12.4% Full)
(.text + .data + .bootloader)

Data:        190 bytes (7.4% Full)
(.data + .bss + .noinit)



-------- end --------


Then in the Caterina folder you should have a Caterina.hex bootloader file .
14  Using Arduino / Microcontrollers / Re: ATMEGA32U4 pin 13 behavior on: September 16, 2014, 11:38:31 pm
Yes, the Caterina bootloader used in the Micro and Leonardo uses the L LED on pin 13 as a "heartbeat breathing" to indicate it is running.  It continues to run the heartbeat even during the code upload.  During this code upload it interrupts the heartbeat breathing so it appears to flicker.
 
15  Using Arduino / Microcontrollers / Re: flashing m328p au(smd) with optiboot stk500v2 failure on: September 16, 2014, 04:33:56 pm
Yes, it looks like that's the way he has it.  Looking at the PCB it's going to the right pins.  Tx and Rx are crossed correctly.
Pages: [1] 2 3 ... 43