dsPIC and EB076

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 and EB076

Post by beambase »

I am having a problem to set up the a 30F6012A to work with a 4D Systems Touch display equvivalent to a EB076 board. I can get it to work if I set it up to use a software UART in the settings but not using the hardware UART. I have checked the Tx/Rx lines with a logic analyser and it seams as if the hardware UARt is not enabled. No visible comms at all. Has anyone used gLCD displays in the dsPIC Version 5.4 release wusing hardware UART? Any success?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: dsPIC and EB076

Post by Benj »

Hello,

Yes we did come across this issue during beta testing though I thought it had been resolved. I will investigate for you.

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: dsPIC and EB076

Post by benp »

I have the same problem.
EB076+30F3014
This is my test program:
tftv03.fcf_pic16
(15 KiB) Downloaded 220 times
It works software uart but not with hardware uart.
I should only have to switch between soft/hardware2 because I am on hardware pins
I test it on RX1/TX1 and TX2/RX2 with no success.
What is strange is that connection is avaiable with hardware mode.
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

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

Re: dsPIC and EB076

Post by beambase »

Hello
I have it working on hardware UART 1 on a 30F6012A chip. I don't exactly remember what did but I think that I had to define the TX and RX pins and RESET in the glcd conmponent settings. I also notice that you are running the glcd Init macro after just a few seconds. I think I had to but in a 9 second delay before i could send anything to the EB076 because of the time it takes to boot the display. After 9 seconds i would respond to serial commands. I also bought a few displays directly from 4D systems and i noticed that they released a new firmware so some of the displays i have had an older firmware and some had a newer. There are some differencies between the two releases, especialy when it comes to the touch functon so it could be worth while to check what 4D firmware your display are running.

Hope this helps.

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: dsPIC and EB076

Post by benp »

I found the problem.
It comes from the "try to update to 57600bps" in the init code.
It works if I comment the code like this:

Code: Select all

#if (%a_MX_GLCD_BUSTYPE != 0)

	//	%a_UART_Send(0x51);								//Update Baud Command
	//	%a_UART_Send(0x0C);								//Update to 57600bps
	//	%a_UART_Receive(255);							//Try to collect Ack
	//	%a_UART_Update_Baud(6);							//Update UART baud to 57600bps

	#endif
It works but there is no more update to 57600.
Does it comes from the 4D firmware or the flowcode C code. I don't know.
Is there a simpler way to know the version than use 4D software and usb to serial adapter? I know it is possible to update the firmware on 4D OLED display. Is it possible on the EB076 TFT display?
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

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

Re: dsPIC and EB076

Post by beambase »

Hello
I remember doing that mod. I also managed to get it to 57kbps but I think that the 4D documentation says that 115bbps should be possible.
I have only used the USB cable and the software that 4D systems provides but that works. You can customize the boot screen of the display that is nice if you want to have a more professional look of your screens. I also loaded custom fonts for scandinavian charachters and done some graphical patterns that I use as buttons, arrows etc do do a better looking user interface. Also to change things like screen orientation and calibrate the touch regions is necessary for the projects that I do.To do that you need the 4D USB cabel and software.

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: dsPIC and EB076

Post by benp »

Here is what I found with the "FAT-Controller" software

Micro-LCD
Hardware Revision: 10
Firmware Revision: 22
H res: 240
V res: 320

I update with "PmmCLoader" with the file"uLCD-32PT-I-SGC-R22"
After this, the version is still the same.

I use the HS speed on EB064. It is only 12MHz.
With this option I was only able to have 9600bps
I change to HSS/2 PLL*16, that's 96MHz

Now I can use the standard 57600 component:
tftv04-57600.fcf_pic16
(15 KiB) Downloaded 212 times
It is possible to go up to 115200 with this C code in inti:

Code: Select all

#if (%a_MX_GLCD_BUSTYPE != 0)

		%a_UART_Send(0x51);								//Update Baud Command
		%a_UART_Send(0x0D);								//Update to 115200bps
		%a_UART_Receive(255);							//Try to collect Ack
		%a_UART_Update_Baud(7);							//Update UART baud to 115200bps

	#endif
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

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

Re: dsPIC and EB076

Post by beambase »

Hello
sorry, my misstake. I am also using the 4D Systems 4,3 inch display. That comes in different models with resistive and capacitive touch screens. That model has newly released PmmC files and I have been updating the displays. I am not using E-block modules but are using these displays on specialy made hardware but are using Flowcode for rapid prototyping.

Post Reply