Netduino home hardware projects downloads community

Jump to content

The Netduino forums have been replaced by new forums at This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Nzc's Content

There have been 17 items by Nzc (Search limited from 19-November 18)

By content type

See this member's

Sort by                Order  

#36544 Netduino Plus 1 Firmware v4.1.0 (update 6)

Posted by Nzc on 04 October 2012 - 08:58 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Nzc,

Before doing the compare in SAM-BA, did you add a few zeros to the "size" value? If not, it will only read the first small bit of FLASH and since the size isn't big enough it will give you a verification failure.

Regarding EK vs AU... -EK means "evaluation kit" and is the name of the main development board for AT91SAM7X512-AU. It uses the same chip as Netduino which is why we use its script to flash the Netduino. Since they both use the same chip, they both flash using the same configuration.


Yes, I make sure to read enough bytes to make the comparison. I had a closer look at the data, and it's always the same bit that appears to be 1 when sometimes it should be 0, and only in one memory block. Can it be that the flash memory is corrupt? At least the file I read back is always the same, but different from what I try to write :(

When I reset gold pad - 3.3V, I can always get back to the CDC connection, and scripts and downloads always run fine, I just don't get the right code in the flash. When reconnecting after the flash, the USB gives a low-level error, and I don't see any info, not even the usual vid/pid stuff.

#36445 Netduino Plus 1 Firmware v4.1.0 (update 6)

Posted by Nzc on 03 October 2012 - 08:38 AM in Netduino Plus 2 (and Netduino Plus 1)

I'm running SAM-BA 2.12 on Win7-x64, and that works fine. I can do the reset, connect to the Netduino and run the scripts. However, when I flash the bootloader (TinyBooterDecompressor) and then read the file back, there are always differences. Strange thing is, when using the memory spy from the SAM-BA tool, not all errors are visible... I am wondering whether the flash in the Atmel is maybe damaged, or whether there is a problem with the different revisions (EK vs. AU)?

#29519 General Utilities

Posted by Nzc on 22 May 2012 - 01:54 PM in General Discussion

Hi to everybody.
You know I'm a software guy, so, after having been helped so many times here, I try to give something back, even if I know I don't have the electronics expertize to be sure that I'm going in the right direction.
So I invite you to read the readme, and, if you want, take a look at the code: I would like to receive some feedback by the experts, to understand if I'm going on the right direction, or if I'm missing something important, like performance, memory size, and I don't know what else...

Hehe, nice to see my evening projects have some use for other people ;) Bit busy lately, but I'll check it out!

#29018 TLC5940

Posted by Nzc on 14 May 2012 - 03:12 PM in General Discussion

If you find any bugs, please send them through, I'm still working on it ;) My current target is the daisy chaining of multiple Tlc-s. The code is very minimal, I'll post an update here when I get it to work. Just a side note: I was discussing this with a colleague here at work, and he told me that these type of PWM drivers usually aren't designed to provide a lot of power to external components. He usually inserts a transistor of FET driven by a high power source. For me, I drive the LEDs from the 5V from the power supply, and then I see a nice 5V block on the scope. If I drive the LEDs from the Tlc, the voltage collapses and I get a block of only ~2V (depending on the exact components of course) About the dot correction: I think it mentions in the datasheet somewhere that by default, the correction factors are 1.0, stored in the Tlc-s EEPROM. You need to explicitly overwrite them by using DCPRG and VPRG. Maybe you hit that accidentally?

#28937 TLC5940

Posted by Nzc on 12 May 2012 - 09:08 PM in General Discussion

One small remarks about the code I posted: when setting up the SPI port, keep the communication speed down to 20 MHz (20000 in the constructor) or so. When I set this to 40 MHz, I see a noticeable flicker when switching. At 20 MHz, all is smooth.

#28926 TLC5940

Posted by Nzc on 12 May 2012 - 06:53 PM in General Discussion

Aw.... bad luck for you :( Sounds like a loose connection indeed. If the entire header is loose, resoldering may help. Be sure to check on the borrom of the boards to see whether it is loose. Do you have some soldering wick? It looks like a braided strip. With this, you can properly remove the old solder, then redo the entire header. If the contacts are only a bit loose, just reflowing the existing solder may be sufficient. Be sure to try with some alternative wires to make sure the cables aren't the real culprit! Hope you manage to fix it... I keep my fingers crossed.

#28817 TLC5940

Posted by Nzc on 11 May 2012 - 12:44 PM in General Discussion

I use the 5V from the Netduino to feed the Vcc. If you only run a few LEDs, that should be sufficient. The 5V should be stable, so if that is visibly flickering, probably better to find a different PSU.

#28812 TLC5940

Posted by Nzc on 11 May 2012 - 11:31 AM in General Discussion

How do you have the LEDs connected to the PWM output? I use Vcc and signal, not signal and ground.

#28781 TLC5940

Posted by Nzc on 10 May 2012 - 06:42 PM in General Discussion

The way the PWM cycle is controlled, all LEDs are blanked out briefly to restart the cycle (that is the pulse on BLANK). In lines 257 and 258, the clocking periods are explicitly restarted after every GS vector write. In line 244, I first pulled up BLANK, since in the datasheet is mentions this: BLANK should be high when writing the GS data. Some things to try: - Uncomment line 244, maybe on your setup it is somehow more critical to blank the LEDs before writing new data? - Comment out lines 257 and 258. This will keep the GS clock and blank cycles running uninterrupted. I don't see any difference on the output when I look at it. I borrowed an oscilloscope from a collegue at work, all the signals coming from the Netduino look what I expect them to be, inclusing the timing. Do you have any means to check the timing of the signal? If on low levels the LEDs light up smoothly, the timing _should_ be ok, but would be nice to check it on a scope.

#28779 TLC5940

Posted by Nzc on 10 May 2012 - 04:52 PM in General Discussion

@Andrea: hm, strange... the output looks completely smooth here, even at the lowest level (step 1). Do you see the flicker at low signal levels, or only when switching?

#28769 TLC5940

Posted by Nzc on 10 May 2012 - 11:31 AM in General Discussion

@Andrea: about the resistor on IREF: yes, page 14 of the datasheet. Good point: I actually see my current being limited to 1.7 mA! I was wondering about that. I should get a smaller resistor to fix that for my setup :) Thanks for the heads-up.

#28758 TLC5940

Posted by Nzc on 09 May 2012 - 09:14 PM in General Discussion

I thank you really much, because at last I found my problem: one of the wires I use on my breadboard was partially broken, or better, could not make a right contact on the netduino. Since I saw that the led pulsed erratically, I started to change the wires one by one, and I found the faulty one. Once I changed it, everything was ok!!! :-((((((((((
If you didn't gave me all the indications to have a functioning solution (thanks to the schematic on sparkfun too!) I could never think to a faulty wire! :-)

NP! Happy to help. I'll brush up the code a bit and put it on sourceforge or so. Isn't there a central repo to place modules like this?

#28757 TLC5940

Posted by Nzc on 09 May 2012 - 09:10 PM in General Discussion

@nzc: why did you say vprg is not wired out? From the pictures and the schematic, it looks just right there!

It's wired, but you cannot set a value directly on it on the Sparkfun board. It's not wired to a terminal. There are a bunch of small holes, I guess I could solder it to one of those if needed. I just hooked it up to a small scope, and the output looks fine to me. I am hooking up an RGB led to it. I see red and blue ok, but somehow the signal collapses quite a bit when the LED is connected. Oh well, that's for tomorrow. Off to bed for me ;)

#28739 TLC5940

Posted by Nzc on 09 May 2012 - 07:29 PM in General Discussion

@Andrea: Netherlands. Can't seem to find how to edit that in my profile :/ I was at work this afternoon, this is just hobbying arounf at home. I'm not using any special parts, so you should be ok. Put VPRG to ground, DCPRG to +5, and I think you can ignore SOUT, XERR. Only one I'm not sure about is IREF. On the layout from Sparkfun, it just shows two resistors to ground. In the datasheet, it says that the resistor to ground programs the max current per channel. On my board it's apparently about 2k2. Do you have the datasheet? I think the 2k2 gives about 20 mA max current.

#28736 TLC5940

Posted by Nzc on 09 May 2012 - 07:11 PM in General Discussion

So my basic setup is like this Netduino port tlc pin 13 SCLK 11 SIN 10 BLANK 9 XLAT 5 GSCLK Then ground and Vcc and Vin to 0, 5, 5. XLAT is on a PWM port, I know, but that's not necesary, really. - BLANK and GSCLK drive the basic PWM process - SIN and SCLK used for SPI send data - XLAT signals that the last 192 bits were data. I attach what I have so far, I think I'll put it up on Sourceforge somewhere when it's more stable. Sorry, I'm just working on this for 2 evenings now ;) I think I need to write a value 0 to get a 100% duty cycle, and 4096 for a 0% cycle. Attached File  PWMSample.cs   2.59KB   29 downloads Attached File  Tlc5940.cs   9.69KB   30 downloads

#28716 TLC5940

Posted by Nzc on 09 May 2012 - 02:11 PM in General Discussion

P.S. You can also attach files just here... :-)

Ok, let's start with that. I think the driver will need some work still. I'll post code and pictures when I get back home tonight.

#28705 TLC5940

Posted by Nzc on 09 May 2012 - 10:07 AM in General Discussion

I'm working on a driver for the Tlc5940 for Netduino. I use the PWM ports from the Netduino to control the BLANK and GSCLK cycles, and the output looks pretty smooth to me, no flicker whatsoever. I have a GSCLK period of 2 microseconds, BLANK on 4096 times that, so roughly 10 ms per PWM cycle. Communication on the SPI port runs at about 40 MHz (if I can believe the documentation ;) ), I don't see any noticable interruptions when switching the signals. I use a shield from Sparkfun, not all pins are exposed there (notably VPRG), but for now it'll do. I actually wanted to ask if there is anyone interested in code like this. Maybe I should just put it on Sourceforge?

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.