Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / Re: High-impedance (tri-state) on pins 0 & 1 [Uno] on: December 16, 2012, 09:25:14 pm
This is an electrical hardware issue, not an internal firmware configuration situation.
The rec data coming to arduino pin 0 from the USB serial converter is going through a series 1k ohm resistor will act as a permanent pull-up to +5vdc as that is the idle state when the USB serial link is not active, so it's an electrical issue and the pin cannot be truly 'tri-stated' as long as that electrical path to the USB chip is intact.

Now possibly if one wanted to erase the firmware in the USB serial converter chip, what you cause all it's I/O pins to default to input only and thus the two 1k series resistors would be a non issue.
It seems to me that it is a firmware configuration issue, but that it's a problem with the USART chip's firmware rather than the main microcontroller firmware. If the atmega16u2 were configured to have PD2 and PD3 (the RXD and TXD pins) as inputs, then that would solve my pull-up problems.

So what does disabling the USART (via the UCSRnA register) do? Does this only tell the atmega328 to stop sending serial commands, or does it initiate some communication with the atmega16u2 to initiate shutdown? The datasheet is a bit dense, maybe someone could clarify for me?

If I start playing with UCSR* registers, will a reset restore default USB functionality, or is there a chance of bricking my Uno? I don't have an ISP programmer, so if USB stops working I'm screwed.
2  Using Arduino / Microcontrollers / Re: High-impedance (tri-state) on pins 0 & 1 [Uno] on: December 16, 2012, 02:51:25 pm
I'm using an Uno, and removing USB programming isn't a good option. I guess the only solution is to upgrade to a Mega so I don't have to reuse the serial I/O pins. Bummer.
3  Using Arduino / Microcontrollers / High-impedance (tri-state) on pins 0 & 1 [Uno] on: December 16, 2012, 01:07:06 am
I'm working on a project that requires pins to be in a high-impedance state. For most pins this works fine by setting the pin to input and disabling the pull-up resistor. However, when I do this with pins 0 and 1 they will source enough current to dimly light an LED. Presumably this has something to do with their dual function for USB. Anything I can do to disable this behavior, either in hardware or software?
4  Using Arduino / LEDs and Multiplexing / Re: Calibrating RGB LED color on: March 14, 2012, 01:56:16 pm
Certainly some resistors are needed to limit the current. The problem is when the different diodes need different resistors. I think I've worked out a way to do this for my project, but it's a lot uglier than the circuit with just one type of resistor and some PWM calibration. I can post the circuit later if anyone is interested, but I don't have access to Eagle just now.
5  Using Arduino / LEDs and Multiplexing / Re: Calibrating RGB LED color on: March 13, 2012, 01:16:02 pm
I was planning on using the LEDs for a charlieplexed cube. I was hoping I could balance in software, since integrating resistors into the cube itself is going to be rather ugly. But now that I think about it, combining a software calibration with the time-division multiplexing wouldn't work well either.

Thanks for the suggestion about RGB space. I hadn't fully appreciated that changing the HSV hue is equivalent to linearly interpolating between the 6 primary RGB colors. I'm definitely seeing some rounding errors, so hopefully that will help.
6  Using Arduino / LEDs and Multiplexing / Calibrating RGB LED color on: March 12, 2012, 04:25:13 pm
I recently got some cheap RGB leds that I'm trying to control. I want to gradually vary the color displayed. I originally did this by continuously changing the hue of an HSV color, then converting that to RGB outputs. However, the transitions between colors don't look very smooth, especially when one of the diodes is switching on or off.

1) Is there a better way to interpolate colors than HSV? I know that color purists disdain HSV because it doesn't preserve lightness very well. I don't need to perfectly reproduce Renaissance art here, but maybe there is some transformation I can put on top of HSV that will keep the overall intensity more uniform?

2) Anyone know an easy way to calibrate the intensity of the 3 diodes? The red diode is quite a bit brighter than the green and blue (only 2V drop vs 3.4V, so it uses almost twice the current). I've been trying to account for this by running it at twice the PWM frequency, but maybe there's a more sophisticated way of calibrating them? Maybe some non-linear gamma correction? The spec sheet didn't have any luminance curves, so I'm stuck comparing brightnesses by eye.

7  Community / Website and Forum / Re: Incorrect Link on: January 24, 2012, 05:07:27 pm
Can someone with write permission fix this on the site? The link is quite helpful, and the official docs for the stepper library are sparse.
Pages: [1]