Pages: 1 [2]   Go Down
Author Topic: Secons Microvga dumb terminal.  (Read 1684 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For new library see:

http://arduino.cc/forum/index.php/topic,101698
Logged

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



I think this is the code I used to get the keyboard to work.  This in not the proper code for it but it worked.
It needs to be changed so it will not repeat.



/*
 http://www.MicroVGA.com/arduino
 
 This sketch is very basic test of the MicroVGA.
 
 Before running it, please make sure the MicroVGA is connected
 properly to the arduino and it is configured for SPI mode
 using built-in setup tool.
 
 
 
 

*/

int pin_cs = 8;
int pin_sck = 13;
int pin_rdy = 9;
int pin_mosi = 12;
int pin_miso = 11;

 




// The setup() method runs once, when the sketch starts

void setup()   {               
  // initialize the digital pins used for the MicroVGA
  pinMode(pin_cs, OUTPUT);     
  pinMode(pin_sck, OUTPUT);     
  pinMode(pin_mosi, OUTPUT);     
  pinMode(pin_miso, INPUT);     
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()                     
{
  int i;
 
  digitalWrite(pin_cs, LOW);
 
  // wait for a second
  // this is required to make sure the MicroVGA is idle
  // normally there would be loop, but to keep this
  // sketch simple, we have replaced it with delay
  delay(1000);                 

  {
    digitalWrite(pin_mosi, i&1 ? LOW : HIGH);
    delay(10);                  // wait for a while
    digitalWrite(pin_sck, LOW);
    delay(10);                  // wait for a while
    digitalWrite(pin_sck, HIGH);
    delay(10);                  // wait for a while
    digitalWrite(pin_sck, LOW);
  }
}

Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The library I developed (link above) handles keyboard input. It also handles backspace and echoing what you type to the screen.
Logged

Pages: 1 [2]   Go Up
Jump to: