dsPIC gLCD speed change

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times
Contact:

dsPIC gLCD speed change

Post by beambase »

Hello
I have been working with the dsPIC Version 5, a 30f6012A PIC and the EB076.
In the init code there is a change of communication speed to 57600 but that doesn't seam to be happening. My logic analyzer tells me that communication is 9600 all the time. Any ideas?

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: dsPIC gLCD speed change

Post by Enamul »

How did you change that in code..I mean did you change that yourself or already changed..Please post the program so that we can guide you
Enamul
University of Nottingham
enamul4mm@gmail.com

beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: dsPIC gLCD speed change

Post by beambase »

The speed change is in th component Init code.
Looking at the C file, this part is greyd out.

delay_s(3); //Wait for Reset

gLCD_1_UART_Receive(0);
gLCD_1_UART_Receive(0);
gLCD_1_UART_Receive(0);

gLCD_1_UART_Send(0x55); // Send autobaud command
gLCD_1_UART_Receive(255); //Try to collect Ack

#if (gLCD_1_MX_GLCD_BUSTYPE != 0)

gLCD_1_UART_Send(0x51); //Update Baud Command
gLCD_1_UART_Send(0x0D); //Update to 57600bps
gLCD_1_UART_Receive(255); //Try to collect Ack
gLCD_1_UART_Update_Baud(7); //Update UART baud to 57600bps

#endif

gLCD_1_UART_Receive(0);
gLCD_1_UART_Receive(0);

FCD_gLCD0_Clear();

gLCD_1_UART_Receive(0);
gLCD_1_UART_Receive(0);

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: dsPIC gLCD speed change

Post by Enamul »

OK..right. Do you know what is the BUS type..if that is 0 in that case speed code part will not work..
#if (gLCD_1_MX_GLCD_BUSTYPE != 0)
Enamul
University of Nottingham
enamul4mm@gmail.com

beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: dsPIC gLCD speed change

Post by beambase »

Hello,
I didn't see that :-)
If I comment out the IF part, save and compile, the display runs in 57600. It doesn't seams to be any referens to the BUSTYPE anywhere else in the gLCD component.
Thanks for the help.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: dsPIC gLCD speed change

Post by Enamul »

Glad to know that it worked.. :)
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply