Show Posts
Pages: 1 ... 132 133 [134] 135 136 ... 385
1996  Using Arduino / Displays / Re: eBay 3.3V TFT screens on: December 18, 2013, 05:43:25 pm
I don't know what you can do about the SPI pins because SPI is bidirectional .

I only need CLK and MOSI (and only in one direction)

Here's a link for a 5V Pro Mini for $3 (+$1.95 shipping): Total cost <$5.

Since you're using a 3.3V FTDI BASIC (I assume), you won't be able to plug the FTDI basic directly into it and
also the pin arrangement is mirror image , with BLK on the LEFT and GRN on the RIGHT. A genuine Pro-Mini
is the reverse so if they were the same voltage you would have to plug the FTDI into it UPSIDE DOWN.

I have both. I plug the FTDI directly into the genuine right side up and use special cable to connect to the
clone.

I've got lots of those. :-)

My FTDI is 3.3V/5V selectable, that's how I'm making the screen work at the moment - feeding 3.3V into the pro mini through the FTDI. I might want to move to 5V later.

PS: The FTDI works fine upside down - no special cable needed.

1997  Community / Exhibition / Gallery / Re: The VideoBlaster Hi Resolution TVout platform on: December 18, 2013, 05:04:00 pm
The Uzebox only has two chips:



1998  Using Arduino / LEDs and Multiplexing / Re: Dynamically determine length of WS2812B LED strands on: December 18, 2013, 04:57:50 pm
any ideas on monitoring current draw via arduino?

You could put a resistor in the circuit and measure voltage drop across it while you search for the end.

When you're happy you've found it, bypass the resistor with a MOSFET.
1999  Using Arduino / LEDs and Multiplexing / Re: Dynamically determine length of WS2812B LED strands on: December 18, 2013, 04:52:59 pm
Well if you could monitor the presence / absence of current draw, you could send a single lit LED along the row and when the current drops to zero you know you have shifted it off the end. This could be one on start up so fast that you would not see it flicker.

I think you'd notice that...can somebody watch the LEDs very carefully on power up and report back? (especially the last LED in the strip)

With the controllers in those photos there's really only one way they can be doing it - measure the current.

2000  Using Arduino / Microcontrollers / Re: Timer1 and duration of instructions on: December 18, 2013, 04:38:27 pm
So my thinking was: I will use timer1 with no prescaller, start measurement, set timer to zero and than wait until hardware interrupt (low state on pin 2 or 3). In that ISR I should read the timer1 value and subtract time, that interrupt call needs. Or something similar, isn't really important, since values so far are clearly wrong or I'm really wrong somewhere in my thinking.

Timer1 can do all that in hardware without the overhead of an interrupt. Look at "input capture" in the datasheet.
2001  Using Arduino / Displays / Re: eBay 3.3V TFT screens on: December 18, 2013, 04:05:04 pm
Have you tried the single resistor with two diodes in the schematic I attached ?

Isn't that to go from 3V to 5V?

I figure out a way to make my pin-direction trick work. I added an external 1K pullup to 3.3V on the D/C pin. With that pullup I can toggle the Arduino pin between INPUT and OUTPUT to make D/C go high/low (INPUT=pulled up, OUTPUT=connected to ground).

The screen is working perfectly, and the same trick should work on CS and RESET saving three resistors. I can't do the same to the SPI pins because they're controlled by hardware.
2002  Using Arduino / LEDs and Multiplexing / Re: How to fade a LED logarithmically on: December 18, 2013, 03:08:56 pm
Try this:

Code:
unsigned int brightness=0xffff;
while (brightness > 255) {
   setLED(brightness>>8);
  brightness -= brightness>>2;
  delay(10);
}

2003  Using Arduino / Displays / Re: eBay 3.3V TFT screens on: December 18, 2013, 01:57:57 pm
Is this what you are referring to ? (see attached)

I was hoping to do it with just a single resistor by matching the impedance of the screen.

I just found time to have a play and this is what I found:

To drop a 5V output down to 3V at the screen end I had to put in a 22k resistor. This suggests the screen has a 40k pullup resistor on it (which is believable - Arduino internal pullups are also about 30-40k).

A 22k resistor is quite high, I don't think I'd be happy trying to send an 8Mhz signal down it.

I guess I'll be using a two resistor divider if I decide to use it with 5V chips. OTOH a 16-pin chip vs. 10 resistors...which will be smaller? It's a tough call.

Edit: Some speculation removed - I tried a trick to avoid level shifting some pins and it didn't work.
2004  Using Arduino / Project Guidance / Re: Master and Slave Arduino over 1500' of buried telephone cable on: December 18, 2013, 07:13:44 am
Would RS485 be a possibility?

Yes, this sort of thing is what is was designed for.

What are you bandwidth requirements? You'll probably have to limit the baud rate to something quite slow.

Being buried is probably an advantage - the earth will shield the cable from radio waves.
2005  Using Arduino / General Electronics / Re: Is delay required for SHIFT register in Arduino Uno/Mega? on: December 18, 2013, 07:08:48 am
Since digitalWrite takes several microseconds there is never a need to include
delays for talking to shift registers

What if you use SPI to send the data? SPI is hardware.

2006  Using Arduino / Project Guidance / Re: Wasp and mosquitoes pest control with arduino on: December 18, 2013, 06:53:47 am
I was reading http://www.electroschematics.com/3864/ultrasound-and-insects/ where it states that some frequencies could make some insects to flee.

Reading about it doesn't make it true.

(If it were true, the world malaria problem would have been solved decades ago...)

https://en.wikipedia.org/wiki/Electronic_pest_control#Effects_on_mosquitoes
2007  Using Arduino / Project Guidance / Re: LCD TFT with Ili9341 chipset way to slow on: December 18, 2013, 05:50:48 am
It's all down to clever programming.

If you erase a graphic by drawing a black square then redraw the graphic somewhere else then it will flicker because there's a moment where the graphic isn't on screen. To fix this you need to draw the graphic in the new position then erase only the part that needs to be erased.

In a pong bat that that moves upwards by two pixels you need to draw two rows of new pixels at the top of the bat then erase two rows of pixels underneath it. If you do it that way it won't flicker at all.

The chip is designed to draw rectangles of pixels (eg text), not single dots. Each rectangle has an overhead of 11 bytes that need to be sent before you can send any pixel data. Drawing a single dot therefore has a lot of overhead (11 bytes of setup, plus a lot of fiddling with I/O pins). If you have a "clear" function that draws 320x240 pixels individually then it will take forever to complete.

I've just been playing around trying to optimize a screen clear function and I can clear the screen about six times per second (which is about as fast as SPI can transfer that much data (6*320*240*2=921600 bytes/sec)).

The three commands you really need for drawing are 0x2a, 0x2b and 0x2c. All the rest are just for setting up the screen.
2008  Using Arduino / Displays / eBay 3.3V TFT screens on: December 18, 2013, 05:28:27 am
I've got one of those little TFT screens from eBay. I have it working on a Pro Mini 3.3V, no problem. Works great. Not exactly speedy but good enough.

Now I'm interested in getting it working at 5V in a limited space.

It should be possible to make it work with just some resistors instead of a CD4050 or voltage dividers. All we need to know is the size of the pullup on the ILI4931 (assuming it has one) then pick a matching resistor to connect it to the Arduino.

Has anybody made this work with just resistors? What value did you use?

I guess I could put in a potentiometer and turn it until I see 3V at the screen but I'm interested to know if anybody else has done it.
2009  Using Arduino / General Electronics / Re: Help with FTDI on: December 18, 2013, 04:37:17 am
One of them has a piece of wire attached to it (the "cable"), the other one doesn't.

2010  Using Arduino / LEDs and Multiplexing / Re: Basic code to make WS2801 LED strip function. on: December 17, 2013, 01:25:00 pm
Finally my initial question was simply to find a basic piece of code to control the LED's If you did not have the answer you could have simply said so instead of trolling the forums looking for someone to make fun of.

It doesn't get much more basic than the one you posted.
Pages: 1 ... 132 133 [134] 135 136 ... 385