Show Posts
|
|
Pages: [1] 2 3 4
|
|
1
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: March 06, 2011, 03:56:08 pm
|
|
kjus,
Nice work on the code updates. I did run a test of your code with an Arduino with 2 displays and saw the 62 fps with a smoother faster scrolling. I then changes the number of boards from 2 to 4 and it changed (as expected) to 31 fps with a much slower but still 'ok' scroll.
I then used a Teensy++ 2.0 which has the DigitalWriteFastNoCheck and pinModeFast2 features built in as the normally listed digitalWrite and pinMode commands. I could not get it to work on the Teensy++ 2.0 using the digital WriteFastNoCheck and pinModeFast2 commands as seen from the digitalWriteFast.h file. What I saw using the digitalWrite and pinMode commands on the Teensy++ 2.0 was basically the same as the digitalWriteFastNoCheck and pinModeFast2 commands as seen on the Arduino (a speed of 31 fps with 4 displays).
So using the digitalWriteFast.h with an Arduino with your code is the same as not using it on the Teensy++ 2.0 with the expected frames per second being 62 fps for 2 displays and 31 fps for 4 displays.
Nice work.
Tim
|
|
|
|
|
7
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: February 06, 2011, 08:02:53 am
|
|
I was slightly mistaken about having no random pixels. The display first starts with a scrolling of text from right to left and then displays the multicolored larger sized "2011" in the first display. It then displays multicolored inidividual lettered static text message. This is pretty good other than I would like to see a faster scroll but it is not too bad.
The problem with the random pixels comes out when the program is looped and it runs again. First the scrolling message runs and no problems there. Then the display of the multicolored larger size "2011" causes some pixels to be off. Then the multicolored individual lettered static text message shows some letters to be missing some LEDs. It always has the same LEDs off everytime.
As a test, I ran the large "Arduino rocks" scroll across the 4 displays (and then the normal other scrolling message, 2011 message and colored text)... This time the "Arduino rocks" scroll (although somewhat slow but reasonably ok), is good until you see a couple of LEDs turn on on the 1st and 2nd display on the very top row. However, after this is done, the normal sized other scrolling message comes out fine with no pixel issues, and the 2011 message is GOOD this time as well as the colored text display (no missing LED pixels). I don't quite understand what is happening here but could be related to the shaddow ram.
|
|
|
|
|
8
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: February 05, 2011, 10:43:58 am
|
I also found a couple of small issues in the h1632_putchar routine that works much better now. Before I would have left over random colored LEDs in the last row of the text messages displayed. Now they are correct. This for (char row=0; row <7; row++) {
was changed to this: for (char row=0; row <=7; row++) { Also in the void line, it had byte declarations for x and y which caused displaying issues especially in the scrolling routine. However, changing it to integer fixed this (as changed previously in past coding). However, I would like some assistance in cleaning up the coding for char c as my bitwise coding is lacking (as there has to be a cleaner way for this). //void ht1632_putchar(byte x, byte y, char c, byte color=GREEN) void ht1632_putchar(int x, int y, char c, byte color=GREEN) { byte dots; //if (c >= 'A' && c <= 'Z' || // (c >= 'a' && c <= 'z') ) { // c &= 0x1F; // A-Z maps to 1-26 //} //else if (c >= '0' && c <= '9') { // c = (c - '0') + 27; //} //else if (c == ' ') { // c = 0; // space //} if (c == ' ') {c = 0;} else if (c == '!') {c = 1;} else if (c == '"') {c = 2;} else if (c == '#') {c = 3;} else if (c == '$') {c = 4;} else if (c == '%') {c = 5;} else if (c == '&') {c = 6;} //else if (c == ''') {c = 7;} else if (c == '(') {c = 8;} else if (c == ')') {c = 9;} else if (c == '*') {c = 10;} else if (c == '+') {c = 11;} else if (c == ',') {c = 12;} else if (c == '-') {c = 13;} else if (c == '.') {c = 14;} else if (c == '/') {c = 15;} else if (c >= '0' && c <= '9') { c = (c - '0') + 16; } else if (c == ':') {c = 26;} else if (c == ';') {c = 27;} else if (c == '<') {c = 28;} else if (c == '=') {c = 29;} else if (c == '>') {c = 30;} else if (c == '?') {c = 31;} else if (c == '@') {c = 32;} else if (c >= 'A' && c <= 'Z') { c = (c - 'A') + 33; } else if (c == '[') {c = 59;} //else if (c == '\') {c = 60;} else if (c == ']') {c = 61;} else if (c == '^') {c = 62;} else if (c == '_') {c = 63;} else if (c == '`') {c = 64;} else if (c >= 'a' && c <= 'z') { c = (c - 'a') + 65; } else if (c == '{') {c = 91;} else if (c == '|') {c = 92;} else if (c == '}') {c = 93;} for (char col=0; col< 6; col++) { dots = pgm_read_byte_near(&my3font[c][col]); for (char row=0; row <=7; row++) { if (dots & (64>>row)) // only 7 rows. plot(x+col, y+row, color); else plot(x+col, y+row, 0); } } } Overall the coding is working very well (except for the scrolling is still a bit slow even with the digitalwritefast routines) now thanks to everyones help. Here is the latest code for up to 4 working displays: http://forums.parallax.com/showthread.php?128037-Sure-Electronics-new-32x16-bi-color-display-3216-RG&p=974131#post974131
|
|
|
|
|
9
|
Using Arduino / LEDs and Multiplexing / Re: arduino big LED matrix with MAX7219s or 74HC595s
|
on: February 05, 2011, 10:10:49 am
|
Piticasgabriel, The link I posted before was to show you the many types of displays that Sure Electronics have some in just 3 mm LEDs and others in both 3 mm LEDs and 5 mm LEDs. Currently I have 4 working displays and hope to have 8 of them working together of their 5 mm type for the 3216 RG displays by Sure Electronics. http://www.sureelectronics.net/goods.php?id=1122You really want to utilize premade LED matrix modules with LED driver chips already installed and ready to just connect up to a micro-controller like an Arduino. If you must design your own LED display board with a custom printed circuit board and individual LEDs, it will be very time consuming and expensive. Let us know if you have any other questions or require further details.
|
|
|
|
|
11
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: February 04, 2011, 05:28:52 am
|
Wagner, Thanks for your help on this. All I was saying about the shadowram was that their was an inconsistancy I saw if the value of Number_of_Displays gets changed from 2 to something else. If Number_of_Displays was to stay at 2, then the following would occur: #define Number_of_Displays 2 #define CHIP_MAX 4*Number_of_Displays //Four HT1632Cs on one board #define X_MAX 32*Number_of_Displays -1 #define Y_MAX 15 CHIP_MAX would have a value of 4*Number_of_Displays being 8. But later in the program Shadowram is a 2 dimensional array of [64][4*2]. byte ht1632_shadowram[64][4*2] = {0}; Further in the program in the HT1632_Clear routine, Shadowram is now set by the value of CHIP_MAX and if CHIP_MAX is 8 then the 2nd array [4*2] is ok but if CHIP_MAX gets changed to 16 because the Number_of_Displays get's is now 4, this will make CHIP_MAX's value 4*4 or 16. 16 does not match up to the original byte declaration of byte ht1632_shadowram[64][4*2] = {0}; as seen below in CHIP_MAX. I hope this makes sense. So all I am saying is that in the HT1632_Clear routine, that it needs not to use the value of CHIP_MAX in the counter routine of 'i'. void ht1632_clear() { char i; //for (int i=1; i<=CHIP_MAX; i++) COMMENT OUT THIS LINE AND REPLACE WITH LINE BELOW SO i GOES to 8 and not the CHANGED VALUE OF CHIP_MAX WHICH COULD BE 16 NOW for (int i=1; i<=8; i++) { ChipSelect(-1); ht1632_writebits(HT1632_ID_WR, 1<<2); // send ID: WRITE to RAM ht1632_writebits(0, 1<<6); // Send address for (i = 0; i < 96/2; i++) // Clear entire display ht1632_writebits(0, 1<<7); // send 8 bits of data ChipSelect(0);
for (int j=0; j < 64; j++) ht1632_shadowram[j][i] = 0; } }
Just a small point I wanted to make, thats is all. Thanks. My real issue with with the random pixels. Tim.
|
|
|
|
|
12
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: February 03, 2011, 10:21:59 pm
|
Wagner and others, I found another bug but this did not fix the random pixel issue but did somewhat clear up some clearing issues better than before. When the Number_of_Displays was 2, it was ok but if Number_of_Displays increases then it affects the value of CHIP_MAX: #define Number_of_Displays 4 #define CHIP_MAX 4*Number_of_Displays //Four HT1632Cs on one board #define X_MAX 32*Number_of_Displays -1 #define Y_MAX 15 CHIP_MAX was used as a value of 8 (when you have 2 displays), but with 4 displays, then the value of CHIP_MAX increases to 16. /* * ht1632_clear * clear the display, and the shadow memory, and the snapshot * memory. This uses the "write multiple words" capability of * the chipset by writing all 96 words of memory without raising * the chipselect signal. */ void ht1632_clear() { char i; //for (int i=1; i<=CHIP_MAX; i++) for (int i=1; i<=8; i++) { ChipSelect(-1); ht1632_writebits(HT1632_ID_WR, 1<<2); // send ID: WRITE to RAM ht1632_writebits(0, 1<<6); // Send address for (i = 0; i < 96/2; i++) // Clear entire display ht1632_writebits(0, 1<<7); // send 8 bits of data ChipSelect(0);
for (int j=0; j < 64; j++) ht1632_shadowram[j][i] = 0; } } However, Shadowram cant be higher than 64 x 8 but this would make it 64x16 causing issues. byte ht1632_shadowram[64][4*2] = {0}; What do you think?
|
|
|
|
|
15
|
Using Arduino / Networking, Protocols, and Devices / Need to know about wireless I2C and Serial possibility in project.
|
on: January 30, 2011, 06:03:34 pm
|
|
I have a device I built that is basically a keypad and a Parallax Serial LCD in an enclosure. It uses a Db25 connection to a main board with a Parallax SX28 master micro-controller and SX28 slave chips to control multiple 7 segment sets of 4 LED displays. However, the Parallax SX28 is now obsolete and I am trying to redesign this with the Arduino which I have not too much experience with but still keep learning.
So far I have found information online to control the 7 segment sets of 4 LED displays with a bootloaded 328P chip (or Arduino board) with not too much problem. So that covers the "slave" driver aspect.
Now as far the master goes, It needs to control the keypad and the LCD and send the data to one of the slave bootloaded 328P chips controlling the 7 segment sets of 4 LED displays. I have also found code that I have modified and is working with the Arduino. Since the Arduino (or 328P) doesn't have a ton of I/O, I have used a TI PCF8574N chip to take the 8 data lines from the keypad and convert them into I2C that the Arduino (or 328P) can understand. The Parallax Serial LCD only uses RX, Vcc, and Gnd so nothing was needed there. It works fine with the standard Arduino "Serial" commands.
I would like to first reduce the DB25 cable into a CAT5e cable which is certainly possible as the only lines I now have are: SDA, SCL, Vcc, Gnd and RX. The slave 328P chips and 7 segment sets of 4 LED displays are going to be run with ribbon cable to the master 328P on the main circuit board. What I would really like to do is to have a wireless solution for the I2C Keypad and Serial LCD. But the Arduino only has 1 set of RX/TX unless I go with an Arduino Mega. Is there such as thing as wireless I2C or would I have to use a differnt chip to convert the keypad into Serial?
Any help would be greatly appreciated.
Thanks,
Tim Gilmore
|
|
|
|
|