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:
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:
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...
4  Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove on: March 26, 2011, 03:18:37 pm
Pin numbers are the same in both cards:
0 for RX
1 for TX

I can't really understand...

Thanks kari!
5  Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove on: March 26, 2011, 02:28:28 pm
In this pdf:
http://www.4dsystems.com.au/downloads/Serial-Display-Modules/uLCD-144(SGC)/Docs/uLCD-144-SGC-DS-rev1.pdf
at page 10 they said to wait up to 500ms from reset to send the autobaud command (0x55) so I wait 1s. The display waits until 5s for this command.
Then the display should answer with the ACK (0x06), so I wait for that.

Thank you
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:
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 smiley-sad
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
Quote
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"...

Quote
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!
8  Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove on: March 26, 2011, 09:15:42 am
That's how I connect the display:

Display          Arduino
5 (RES)          RESET
6 (GND)          GND
7 (RX)             TX
8 (TX)             RX
9 (VIN)            +5

Thank you
9  Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove on: March 26, 2011, 07:58:36 am
I agree...
but the same display works with the same code in the mega2560. And I tried it with two duemilanove and it doesn't work...

Thank you

Andrea
10  Using Arduino / Displays / Re: uLCD-144 4D problem with Duemilanove on: March 26, 2011, 07:25:47 am
Sorry smiley

Code:
void setup()
{
   Serial.begin(9600);
   delay(1000);
   
   Serial.write(0x55);
   while(!Serial.available());
   Serial.print(Serial.read(), HEX);
}

void loop()
{
}
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
12  Using Arduino / Microcontrollers / Re: Upload sketch only once! on: March 10, 2011, 12:08:52 pm
That's it!!  smiley
Now it works!

Thank you very much!!

Andrea
13  Using Arduino / Microcontrollers / Re: Upload sketch only once! on: March 10, 2011, 06:46:50 am
In my board there is the FT232 and I have connected the DTR pin just like in the arduino board.
This is the circuit:

IC11 is the FT232 and C33, C28 are both 100nF.

Thank for your help!
14  Using Arduino / Microcontrollers / Re: Upload sketch only once! on: March 09, 2011, 06:27:23 pm
I have already tried this, too.
Do you think that using avrdude directly without the ide could be a solution for the boot loader error?
I searched on web about this problem and I found another person who can upload a sketch only ones and was a problem with fuses...
This is the link: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268700386/0

Thank you
15  Using Arduino / Microcontrollers / Re: Upload sketch only once! on: March 09, 2011, 05:54:56 pm
Mac Os X 10.6.6 and arduino IDE 0022...
I also tried with 0020 with the same result...

Should I try on windows?

Thank you
Pages: [1] 2