Pages: 1 [2]   Go Down
Author Topic: avr to vfd  (Read 1498 times)
0 Members and 1 Guest are viewing this topic.
Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess there is probably an Arduino in there somewhere.

Don

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tried the alteration you suggested; the same result after upload.


Code:

void initialize() // DIFFERENCE!!!!!!!!!!!!!!INITIALIZATION ROUTINE from Noritake Site
{
 int i = 0;
 for (i=Enable; i <= RS; i++) {
   pinMode(i,OUTPUT);
}
 delay(300);              // initiatize lcd after a short pause needed by the LCDs controller
 
 LcdCommandWrite(0x30);  // function set: 8-bit interface, 1 display lines, 5x7 font
 delayMicroseconds(1);
 
 LcdCommandWrite(0x30);  // function set:8-bit interface, 1 display lines, 5x7 font
 delayMicroseconds(1);
 
 LcdCommandWrite(0x30);  // function set:8-bit interface, 1 display lines, 5x7 font
 delayMicroseconds(1);                       
 
 
 LcdCommandWrite(0x30);  // function set:8-bit interface, 1 display lines, 5x7 font
 delayMicroseconds(1);                       
                                                                 
 LcdCommandWrite(0x0F);  // display control:turn display on, cursor on, blinking
 delayMicroseconds(1);                       
                       
 LcdCommandWrite(0x01);  // clear display, set cursor position to zero 
 delayMicroseconds(200);
 
 LcdCommandWrite(0x80);  // display control:turn display off, cursor off
 delayMicroseconds(1);                       
                     
}
/////////////////////////////////////////////////////////////////////////////
//*******************************************************
void Lcd_gotoxy(unsigned char x, unsigned char y)

 unsigned char firstCharAdr[]={0x80,0xC0,0x94,0xD4};//table 12-5 
 LcdCommandWrite(firstCharAdr[y-1] + x - 1);
 delayMicroseconds(100);
}

//*******************************************************
void Lcd_print( char * str )
{
  unsigned char i = 0 ;
  while(str[i]!=0)
  {
    LcdDataWrite(str[i]);
    i++ ;
  }
}

//*******************************************************
void setup(){
initialize();
Lcd_gotoxy(1,1);      // begin on (0,0) row1
Lcd_print("MERRY CHRISTMAS");
Lcd_gotoxy(1,2);       // begin on (0,1) row2
Lcd_print("MOM!!!");
while (1){};
}
void loop()
{
   
}

Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your photograph shows at least four displays.  It looks like three of them are LCDs and one is a VFD.  I thought we are dealing with the VFD since that is what is is in the forum title yet it is one of the LCDs that seems to be displaying a single 'S'.  If that is the 'S' to which you were referring then why did you call it an 's' ?  

There is no place in your program where you are sending an 's' to the LCD but the last character that you are sending to the top line is an 'S'.  Try putting a delay in there and see if all of the characters are actually being sent but all you are seeing is the last one.



Quote
Tried the alteration you suggested; the same result after upload.

Let's try this part again.
Code:
...  // function set: 8-bit interface, 1 display lines, 5x7 font
...
... // begin on (0,0) row1
...
... // begin on (0,1) row2

While you are at it - here are the previous questions you haven't answered and the requests that you have not fulfilled so far.  These are just for this thread, they do not include the one in May.

Reply #4
-Which code?
-Pixels or blocks?
-On row 1 or on rows 1 and 3?
-What is channel 7 showing?
-I really cannot make any suggestions without seeing the code along with clear photographs of the interconnections and the resulting screen.  
-You seem to have at least one LCD functioning.  What code did you use for that one?

Reply #10
-...we don't know which of your programs is associated with which picture.
-I suggest that you pick one of your programs, post the code, post a legible picture of the interconnections between the display and the Arduino, and post a legible picture or explanation of exactly what appeared on the display when you ran that code.

Reply #13
-And where does that character appear?
-Which picture satisfies this request? "post a legible picture of the interconnections between the display and the Arduino"

Don



« Last Edit: November 29, 2012, 09:48:34 am by floresta » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Your photograph shows at least four displays.  It looks like three of them are LCDs and one is a VFD.  I thought we are dealing with the VFD since that is what is is in the forum title yet it is one of the LCDs that seems to be displaying a single 'S'.  If that is the 'S' to which you were referring then why did you call it an 's' ? 

There is no place in your program where you are sending an 's' to the LCD but the last character that you are sending to the top line is an 'S'.  Try putting a delay in there and see if all of the characters are actually being sent but all you are seeing is the last one.
The 16x2 with back light is running with the 2560; there is a problem getting print onto the 2nd line.
It's an 's' and when i add the bigger delay as you suggested, i do get the 1st line of data merry christmas but not the 2nd line.
Im running the 2 displays at the same time in the hope i will see the vfd come while making adjustments to the program that works with the LCD which is why I sent the 3 pdfs with 3 sketches showing the progression from the 1st to the 3rd and more recent.
The link that the forum member Ravi provided to the noritake site gave me the init routine for this type of vfd and that's what i used, and  then came up with the 's' character; figured a smaller delay for the vfd would be required compared to the lcd and that's why some of the info disappeared.
   Of all the groups preparing for presentations, I am the only one who has not integrated yet. I still have to put a keypad to talk to the display directly through the MCU, displaying data first to field 3, then on hitting enter, have the data put onto field 1 with field 3 cleared.
   My project coordinator has strongly suggested that i get to this and put the thing together, given i have still the updated report to submit, plus powerpoint...before the 10th.
    I am starting to think that the vfd controller chip could be faulty so I'm just gonna go ahead and work the LCD which gives me the data for now. Kind of disappointed having taking so long trying to get this thing to work.
    Anyhow, I hope what I've sent covers all you wanted, save the timing diagram channel 7; when the data is on, that's what I'm getting in terms of all the channels the scope is wired up to.
Dave.

* Circuit Connection.docx (21.24 KB - downloaded 6 times.)
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
... there is a problem getting print onto the 2nd line.
I have pointed out the problem twice, in first in Reply #13 ...
Code:
LcdCommandWrite(0x30);  // function set: 8-bit interface, 1 display lines, 5x7 font
...
Lcd_gotoxy(1,2);

... and again in Reply #17.
Code:
...  // function set: 8-bit interface, 1 display lines, 5x7 font
...
... // begin on (0,0) row1
...
... // begin on (0,1) row2
If you don't get this resolved you will never see anything on the second line no matter what else you do.

Quote
figured a smaller delay for the vfd ...
These devices can work with DC, that is you can use switches to set the logic levels and a push button to pulse the Enable line.  A longer delay will never keep the device from working properly.

Don
« Last Edit: November 29, 2012, 01:58:32 pm by floresta » Logged

Pages: 1 [2]   Go Up
Jump to: