Pages: 1 [2]   Go Down
Author Topic: MicroVGA-TEXT and Arduino support  (Read 4433 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I realise this post is a bit old now but i dont think it's uVGA board because mine doesn't work with Duino in SPI either, it works fine with PIC though

Code:
/*
 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.
 
 The demo should SLOWLY display "U" character infinitely.
 
 If something else is displayed, there is a problem with
 noise on SCK pin. Or something else...

*/

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

 
// Other experimental variant:
/*
int pin_cs = 0;
int pin_sck = 7;
int pin_rdy = 1;
int pin_mosi = 5;
int pin_miso = 6;
*/



// 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);                  

  // now output 8 bits using software SPI  
  for (i=0;i<8;i++) {
    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);
  }
}


Having since tried this software SPI code, uVGA does work, but the library doesn't still
« Last Edit: January 23, 2010, 02:02:32 pm by Funky_Gibbon » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Same problem here. The software SPI test works but the library code doesn't. I'm going to debug this over the coming week if I get time, this has to work  :smiley
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Dach,

Please take a look at my earlier post on this subject
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264372292

there is an error in the original .c file

let me know how it goes, both demo's work fine for me now and i've found uVGA to be very usefull
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

excellent, yes that's working great. Thanks for saving me the debugging time  :-)

Now I can start having fun with this thing.
Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For those who are interested, I added a version for the Arduino Mega at:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264372292

It works fine for me now.
Feel free to change if needed.
Logged

Pages: 1 [2]   Go Up
Jump to: