Show Posts
Pages: [1]
1  Using Arduino / LEDs and Multiplexing / Re: Three CAT4101 in parallel on: June 06, 2014, 03:27:59 am
Oops.....

As shown in the schematic I drew, there are no resistors in series with these LEDs.
http://www.cree.com/~/media/files/cree/led%20components%20and%20modules/xlamp/data%20and%20binning/xlampxml.pdf
2  Using Arduino / LEDs and Multiplexing / Re: Three CAT4101 in parallel on: June 06, 2014, 02:58:31 am
Paul,

one CAT will only provide 1A, I want to parallel them so that I can fully utilise the 10W LEDs with 3A.

560R resistors.

Here's the datasheet.
http://www.onsemi.com/pub_link/Collateral/CAT4101-D.PDF
3  Using Arduino / LEDs and Multiplexing / Re: Three CAT4101 in parallel on: June 05, 2014, 09:17:10 pm
Ok, I've attached the image here.
4  Using Arduino / Microcontrollers / Re: ATMega328p flashing with ISP on: June 05, 2014, 09:15:12 pm
My code simply toggles the spi lines repeatedly.

Code:
// Set MOSI, SCK, SS as Output
DDRB |= (1<<PIN_MOSI)|(1<<PIN_SCK)|(1<<PIN_SS);

for (;;) {
PORTB &= ~(1<<PIN_MOSI);  // drive PB3 low
PORTB &= ~(1<<PIN_SCK);  // drive PB5 low
delay_ms(50);
PORTB |= (1<<PIN_MOSI);   // drive PB3 high
PORTB |= (1<<PIN_SCK);   // drive PB5 high
delay_ms(50);
}

I'm using Atmel Studio with a Pololu USB AVR programmer (stk500) to program the ATMega328p.
http://www.pololu.com/product/1300

I've also tried burning the Arduino bootloader with the Arduino IDE and I get a 'not in sync' error.

The LED on the Arduino is flashing and a scope shows that the code is executing, but I can no longer program the devices.

5  Using Arduino / Microcontrollers / Re: ATMega328p flashing with ISP on: June 05, 2014, 11:49:48 am
That's what I would have thought!

So.. why would it be that as soon as I flash the  code onto another arduino, it becomes bricked also?
6  Using Arduino / LEDs and Multiplexing / Three CAT4101 in parallel on: June 05, 2014, 09:50:45 am
Hi guys,

I've tested the LEDs with one CAT4101 and they work great, but now it's time to dial it up a notch.

I've now got three CAT4101's wired up in parallel to give me 3A to drive two 10W CREE LEDs in series.

The LEDs get lit dimly, whether I have the EN pins hooked up to 5V or left disconnected!

Here's my schematic, can anyone see anything wrong with it?

7  Using Arduino / Microcontrollers / Re: ATMega328p flashing with ISP on: June 05, 2014, 09:31:02 am
I can no longer flash it with updated code.

I believe the stk500 programmer cannot communicate due to spi lines being in use. I assumed that the programmer would use the reset line to avoid this issue.
8  Using Arduino / Microcontrollers / Re: ATMega328p flashing with ISP on: June 04, 2014, 10:21:36 pm
All fuse settings are correct and I can confirm that the code is executing (using a scope on the lines).

Reset pin also confirmed working.

Any way other than parallel?
One of these chips is on a custom board, not an Arduino, that doesn't have all the pins broken out.
9  Using Arduino / Microcontrollers / ATMega328p flashing with ISP on: June 04, 2014, 03:01:55 am
I flashed some code onto an Arduino Uno, using Atmel Studio with an stk500 programmer.

This code is toggling the SPI lines every 50ms.

I believe this is preventing the programmer from communicating with the ATMega328p.

I cannot read the device ID and I cannot program the chip.

Any advice?

I accidentally did this with two of them.
10  Products / Arduino Due / Re: EEFC page programming on: January 28, 2013, 01:22:26 am
I am aware of and have considered those four points. They're all pretty clearly stated in the datasheet.
Thanks, though.


My Due is reporting only one plane of 256kB. Strange.
11  Products / Arduino Due / Re: EEFC page programming on: January 24, 2013, 10:37:12 pm
Ok... so, I've ditched the Arduino IDE and moved back to Atmel Studio 6.
The IDE causes all sorts of issues/conflicts that I can never figure out.

I can now call the IAP function using the exact same code I was trying to use in the Arduino IDE.

I am successfully programming the flash.

I now have two unanswered questions.
  • Why can I not call the IAP function using the Arduino IDE?
  • Why am I getting only one plane of 256kB when I retrieve the flash descriptor?
    (Should I not be getting 2x256kB?)

I was intending on setting the boot flag for flash0/flash1 to jump to/from a bootloader.
12  Products / Arduino Due / Re: EEFC page programming on: January 23, 2013, 11:10:44 pm
I have come to the conclusion that I must use the IAP function stored in the ROM.

How to call this, I am unsure.

The example given in the datasheet passes it two arguments. The EEFC ID (0 or 1) and the contents to write to the EEFC_FCR register.
However, the description of the function specifies it only takes one argument.

In any case, I am unable to call it successfully. The Arduino simply hangs.

Perhaps there is some way to run a function from ram.
13  Products / Arduino Due / EEFC page programming on: January 23, 2013, 10:13:42 pm
I'm trying to write to pages using the EEFC on the SAM3X.

I've successfully managed to write and read lock-bits using code like the following.

Code:
EFC0->EEFC_FCR = (0x5A << 24) | 0x0A;
while (!EEFC_FSR_FRDY) {
}
Serial.print("FRR: ");
Serial.println(EFC0->EEFC_FRR);


If I read the flash descriptor using
Code:
EFC0->EEFC_FCR = (0x5A << 24) | 0x00;
I am informed that there is 1 plane of 256kB of memory. Each page is 256 bytes and there are 16 lock bits covering 16384 bytes (64 pages) each.

Isn't the SAM3X meant to have two planes of 256kB for a total of 512kB?

Nevertheless, using these figures I calculated that 0xBE800 should correspond to the 1000th page (0x3E8).

Code:
pp = (uint32_t*)0xBE800;
*pp++ = 0xFF00FF00;
*pp++ = 0xFF00FF00;
*pp++ = 0xFF00FF00;
*pp++ = 0xFF00FF00;
EFC0->EEFC_FCR = (0x5A << 24) | ( 0x3E8 << 8 ) | 0x03;

The Arduino hangs.
But upon reboot... success! The page of flash was written correctly.
If I try using EEFC1, the Arduino remains responsive but the page is not written.
Pages: [1]