Loading...
Pages: [1]   Go Down
Author Topic: Vizio Smart GPU.....To replace a current alphanumeric LCD  (Read 845 times)
0 Members and 1 Guest are viewing this topic.
Massachusetts
Offline Offline
Jr. Member
**
Karma: 0
Posts: 96
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please help!!

I have built a proto to measure voltage with an arduino and a 16X2 alphanumeric LCD, it works great!!   Only I would like to know if its possible to replace the current alphanumeric LCD with the Color Smart GPU and display the same results.  If it is possible could you please provide a short sample code that would replace my current code below. 

Thank You!!




      // include the library code:
     #include <LiquidCrystal.h>
     #include <PID_v1.h>
     #define aref_voltage 1.72
     #define PPO inputReading1*aref_voltage/1024
     
     
   
      //Define Variables we'll be connecting to
      double Setpoint, Input, Output;
      //Specify the links and initial tuning parameters
      PID myPID(&Input, &Output, &Setpoint, 5,7,2, REVERSE);
     
     
       // initialize the lcd with the numbers of the interface pins
      LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
     


/****************************************************************
*initiate pins for each led
*****************************************************************/
 const int red1      =22;
 const int blue1     =28;
 const int green1    =26;
 
/****************************************************************/     
     

     
/****************************************************************
*initiate pins for sensor inputs 1, 2, 3
*****************************************************************/             
 const int sensor1 = A0;  // the analog pin the 02 Sensor Vout pin is connected to
       int inputReading1; //declare a variable
     
                         
 const int sensor2 = A1;  // the analog pin the 02 Sensor Vout pin is connected to 
       int inputReading2; // declare a variable   
               
     
 const int sensor3 = A2;  // the analog pin the 02 sensor Vout pin is connected to
       int inputReading3; // declare a variable
               
     
/*****************************************************************/     
 
 
    void setup ()
   
   
   {

      Input = analogRead(PPO);
      Setpoint = 520;
 
      myPID.SetMode(AUTOMATIC);
 
 
      analogReference(EXTERNAL); // set external analog Ref for PPO output
         

     
 /*****************************************************************
*set output assignments for led pins
******************************************************************/     
      pinMode( red1, OUTPUT);
      pinMode( green1, OUTPUT);
      pinMode( blue1, OUTPUT);
     
/****************************************************************/     
     
     
       
/***************************************************************
*set up the LCD's number of columns and rows:
****************************************************************/
    lcd.begin(20, 4);
 
    lcd.setCursor(0, 0);//where to start cursor
    lcd.print("PINA SYSYTEMS       ");//print message
    lcd.print("SOFTWARE VERSION 1.0");//print message
    delay(2000);
    lcd.clear(); 
     
    lcd.setCursor(0, 0); // set the cursor to column 0, line 0
    lcd.print("PP1");  // Print a message to the LCD.
 
    lcd.setCursor(6, 0); // set the cursor to column 6, line 0
    lcd.print("PP2"); // Print a message to the LCD
 
    lcd.setCursor(12, 0); // set the cursor to column 12, line 0
    lcd.print("PP3");  // Print a message to the LCD.
/*************************************************************/   
   
       
  }



     void loop ()
   
  {
   
/*************************************************************
* turn the output pin on/off based on pid output
**************************************************************/
      Input = analogRead(PPO);
      myPID.Compute();
      analogWrite(7,Output);
 
 
/*************************************************************/
 
   
   
    if (PPO >= 1.10 && PPO <= 1.40) color(255, 0, 0);
    if (PPO <  1.10 && PPO >= 0.80) color(0, 255, 0);
   
 
   
    lcd.setCursor(0, 1); //sets the cursor to column 0, line 1
    //getting the voltage reading from the 02 sensor
    inputReading1 = analogRead(sensor1);
    // converting that reading to voltage
    float voltage1 = inputReading1 * aref_voltage;
    voltage1 /= 1024.0;
    //print actual voltage to lcd
    lcd.print(voltage1, 2);   
    delay(200);
   

    lcd.setCursor(6, 1); //sets the cursor to column 6, line 1
    //getting the voltage reading from the temperature sensor
    inputReading2 = analogRead(sensor2);
    // converting that reading to voltage
    float voltage2 = inputReading2 * aref_voltage;
    voltage2 /= 1024.0;
    //print actual voltage to lcd
    lcd.print(voltage2, 2);
    delay(200);     
 
 
    lcd.setCursor(12, 1); //sets the cursor to column 12, line 2
    //getting the voltage reading from the temperature sensor
    inputReading3 = analogRead(sensor3);
    // converting that reading to voltage 
    float voltage3 = inputReading3 * aref_voltage;
    voltage3 /= 1024.0;
    //print actual voltage to lcd
    lcd.print(voltage3, 2);
    delay(200);
 
  }
 
  void color (unsigned char red, unsigned char green, unsigned char blue)
 
  {    
          analogWrite(red1, 255-red);    
          analogWrite(blue1, 255-blue);
          analogWrite(green1, 255-green);
  }    
     
Logged

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

As things stand right now you are limited to receiving help from those forum readers who are familiar with both the "Color Smart GPU" and with the HD74480 based displays.  If you were to post a link to information, preferably a datasheet, about that "Color Smart GPU" then you have a much greater chance of getting help since a lot of us are familiar with the HD74480 based displays.

Please use the 'code' button, it looks like a '#', when posting code.


Don
Logged

Massachusetts
Offline Offline
Jr. Member
**
Karma: 0
Posts: 96
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great Thank you....I'll do that right now.
You can find the datasheet here....

http://vizictechnologies.com/#/smart-gpu/4554296549
Logged

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

Quote
Only I would like to know if its possible to replace the current alphanumeric LCD with the Color Smart GPU and display the same results. 

This part certainly looks possible.

Quote
If it is possible could you please provide a short sample code that would replace my current code below. 

This part is is a bit harder.  You are starting with a program designed to send ASCII information to a character mode display via a parallel interface.  You now want to display the same characters on a graphical display and send the information via a serial interface. 

You might start looking for a serial GLCD library as a starting point.


Don


Logged

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

Okay Guys I just ordered the Color Smart GPU Today, at first i was hesitant due to their being several similar displays in fact using the same touch overlay but none matching the arduino shield exactly all much cheaper and with a lot less for shipping.
I found this link that might be a good place in addition to the sample code provided at the vizic site http://mbed.org/cookbook/SMARTGPU as soon as my display arrives I wouldn't mind a looking over the required differences to the coding
Logged

Pages: [1]   Go Up
Print
 
Jump to: