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?
dsPIC gLCD speed change
Moderator: Benj
- 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
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
-
- Posts: 94
- Joined: Wed Jul 29, 2009 5:15 pm
- Has thanked: 6 times
- Been thanked: 8 times
- Contact:
Re: dsPIC gLCD speed change
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);
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);
- 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
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)
-
- Posts: 94
- Joined: Wed Jul 29, 2009 5:15 pm
- Has thanked: 6 times
- Been thanked: 8 times
- Contact:
Re: dsPIC gLCD speed change
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.
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.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact: