Show Posts
|
|
Pages: [1] 2
|
|
1
|
Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove
|
on: March 27, 2011, 09:00:18 am
|
|
I read it...it tells to be sure that the tx line is high in the beginning. Hence, I also tried to force the tx pin high (digitalWrite(1, HIGH)), but nothing.. Where are you reading in the document?
The display doesn't display anything and this is good because it means that it received the auto-baud command, but in I try to send other command to draw something, nothing happend..
Thank for your time!
Andrea
|
|
|
|
|
2
|
Using Arduino / Networking, Protocols, and Devices / Re: EhernetShield + SD -> slow webserver
|
on: March 27, 2011, 08:04:22 am
|
Sorry, this is the right code: //SPI devices PINs #define CAN_CS 9 #define CAN_INT 6 #define LAN_CS 53 #define SD_CS 4
//Macros to manage SPI #define CAN_OFF digitalWrite(CAN_CS, HIGH) #define LAN_OFF digitalWrite(LAN_CS, HIGH) #define SD_OFF digitalWrite(SD_CS, HIGH) #define CAN_ON digitalWrite(CAN_CS, LOW) #define LAN_ON digitalWrite(LAN_CS, LOW) #define SD_ON digitalWrite(SD_CS, LOW)
#define WEB_PREFIX "" #define WEB_PORT 80 WebServer webserver(WEB_PREFIX, WEB_PORT);
void setup() { pinMode(LAN_CS, OUTPUT); pinMode(SD_CS, OUTPUT); pinMode(CAN_CS, OUTPUT); //Init SD SDInit(); //Init LAN Module LANInit();
//Init WebServer WSInit(); }
void LANEnable() { CAN_OFF; SD_OFF; LAN_ON; }
//### Ethernet void LANInit() { LANEnable(); byte mac[] = { 0xDE, 0xAD, 0xBE, 0xE9, 0xA4, 0xE1 }; byte ip[] = { 10, 0, 1, 177 }; byte gateway[] = { 10, 0, 1, 1 }; byte subnet[] = { 255, 255, 255, 0 }; Ethernet.begin(mac, ip, gateway, subnet); }
//### SD void SDEnable() { LAN_OFF; CAN_OFF; SD_ON; }
void SDInit() { SDEnable(); SD.begin(SD_CS); }
void WSInit() { LANEnable(); webserver.begin(); webserver.setDefaultCommand(&homePage); webserver.setFailureCommand(&failureCmd); }
|
|
|
|
|
3
|
Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove
|
on: March 27, 2011, 05:16:17 am
|
Yes, the USART is the same. Yes, I am using the IDE's serial monitor to look for the answer... I have just tried to remove the atmega328p from the duemilanove and build an easy circuit on a breadboard with this code: void setup() { pinMode(13, OUTPUT); digitalWrite(13, HIGH); delay(300); digitalWrite(13, LOW); delay(300); Serial.begin(9600); delay(500); Serial.write(0x55); while(!Serial.available());
}
void loop() { digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); delay(1000); } so if it works the led connected to pin 13 should blink...but nothing...
|
|
|
|
|
6
|
Using Arduino / Networking, Protocols, and Devices / EhernetShield + SD -> slow webserver
|
on: March 26, 2011, 02:21:21 pm
|
Hi! I'm trying to use both the webduino library and the sd library and when I init the sd, the webserver becomes very slow. This is the code: pinMode(53, OUTPUT); pinMode(4, OUTPUT); digitalWrite(53, HIGH); //turn off wz5100 SD.begin(4); digitalWrite(4, HIGH); //turn off sd Ethernet.begin(mac, ip, router, subnet);
and then I start the webserver... I think this is because the sd makes slower the spi speed, but I don't know how to fix it  Have you any idea? Thanks! Andrea
|
|
|
|
|
7
|
Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove
|
on: March 26, 2011, 01:46:31 pm
|
What comes to my mind is that your TX and RX are swapped, could it be? Yes, it is right, because the display tx and rx are from "the display point of view"... Do you have the USB plugged in at the same time? Try disconnecting it. I tried but nothing change... It is unbelievable! Same code, same wiring! I just move wires from the mega to the duemilanove! Thank guys for your time!
|
|
|
|
|
11
|
Using Arduino / Displays / uLCD-144 4D problem with Duemilanove
|
on: March 26, 2011, 06:35:38 am
|
|
Hi, I have a uLCD-144 from 4D. It works without problems with an arduino Mega2560, but it fails with Duemilanove. It is very simple to manage: it uses serial communication to send some specific command. For instance, to inizialize it you have to send 0x55 and it should respond with 0x06 (ACK). I wrote a simple sketch that send 0x55 and wait for something from serial and in the mega2560 it works, but in duemilanove doesn't. I can't understand why...
Thank you!
Andrea
|
|
|
|
|