bilbo:
The microVGA library uses SPI, and multiple devices can be connected to it at the same time, as long as they are not transmitting simultaneously. You only need to change the CS/SS pin in the UVGA library to an unused pin, and make sure that one device is always deselected before another is selected.
D11 - Not connected (but should be SPI MOSI)
D12 - Not connected (but should be SPI MISO)
What do you mean by this? The ethernet shield talks to arduino over SPI, using 11 and 12 as MOSI and MISO.
Well it's what i found in the old forum, it seems that information was wrong...
maybe i should further clarify what i'm trying to do here...
this is the ethernet adapter code working:
//net
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x4F, 0xAF };
byte ip[] = { 192,168,1,121 };
byte server[] = { 195, 211, 72, 36 };
//twitter 199.59.149.230
//google 74.125.79.104
//thepaintjob 195.211.72.36
// Initialize
Client client(server, 80);
void setup() {
//net
Ethernet.begin(mac, ip);
//serial
Serial.begin(9600);
}
void loop()
{
if (client.available()) {
char c = client.read();
Serial.print(c);
if (c == '^') {
Serial.println();
}
}
// if the server's disconnected, stop the client:
if (!client.connected()) {
client.stop();
delay(5000);
Ethernet.begin(mac, ip);
if (client.connect()) {
// Make a HTTP request:
client.println("GET /~deb5250/other/arduino/twit.php");
}
else {
//Serial.println("connection failed");
}
}
}
this is what i would want to do,
//vga
#include <arduino_uvga.h>
#include <conio.h>
//net
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x4F, 0xAF };
byte ip[] = { 192,168,1,121 };
byte server[] = { 195, 211, 72, 36 };
//twitter 199.59.149.230
//google 74.125.79.104
//thepaintjob 195.211.72.36
// Initialize
Client client(server, 80);
void setup() {
//net
Ethernet.begin(mac, ip);
//vga
microvga_init();
clrscr();
}
void loop()
{
if (client.available()) {
char c = client.read();
_putch (c);
}
// if the server's disconnected, stop the client:
if (!client.connected()) {
client.stop();
delay(5000);
Ethernet.begin(mac, ip);
if (client.connect()) {
// Make a HTTP request:
client.println("GET /~deb5250/other/arduino/twit.php");
}
else {
//Serial.println("connection failed");
}
}
}
still i need to modify the microVGA library so it will work together with the ethernet shield, i'm not sure how to change it according to you suggestion:
You only need to change the CS/SS pin in the UVGA library to an unused pin, and make sure that one device is always deselected before another is selected.
i understand i need to change the following:
#define DD_SS 2 // PB2 | Arduino Digital 10 *
but if 2 represents digital output 10 how would i change it to use output 7?