Forums

UART issue with C6713

Started by mich...@msn.com March 22, 2011
Hello, I am a final year student in the UK trying to get the TMS320C6713 DSP to interface with a touchscreen via a UART connection. I am using the DSK from Spectrum Digital and CCS 3.1. I am using SPRA633C document to get the serial port on the DSK to act like a UART. I have connected pin 36, 42 and 44 and DX1, DR1 and GND respectively on the J3 serial port. These pins connect to a MAX232 chip which itself connects to a PC. I want to test the output of the DSP before connecting it to the touchscreen but currently I am just trying to get the tutorial code to work.

I have tried using software to send characters from the PC to the DSP and back as the tutorial describes but so far I have not been able too. I have consulted a PhD student at my university who is researching DSPs and has worked with the C6713 before but he was unable to offer any help with why it wont work. I have noticed that in the SPRA633C document figure 14 on page 11 appears to have an error. From other documents I have seen it appears that the CONN DB9 connection is incorrectly labelled; pin 9 is shown as GND in SPRA633C when in other documents GND should actually be 5.

If anyone can offer any advice or help it would be greatly appreciated as I need to get this working by the end of the week.

Thanks in advance, Michael

_____________________________________
Michael,

McBSP0 and 1 are by default connected to the AIC23 audio codec on the
DSK6713. Did you switch the McBSP pins to the daughter card connector?
CPLD MISC Register, Bit1 must be set for McBSP1. (DSK Technical
Reference Manual, page 2-5)

Best Regards,
Adolf Klemenz

On 22.03.2011 22:31, m...@msn.com wrote:
> Hello, I am a final year student in the UK trying to get the TMS320C6713
> DSP to interface with a touchscreen via a UART connection. I am using
> the DSK from Spectrum Digital and CCS 3.1. I am using SPRA633C document
> to get the serial port on the DSK to act like a UART. I have connected
> pin 36, 42 and 44 and DX1, DR1 and GND respectively on the J3 serial
> port. These pins connect to a MAX232 chip which itself connects to a PC.
> I want to test the output of the DSP before connecting it to the
> touchscreen but currently I am just trying to get the tutorial code to work.
>
> I have tried using software to send characters from the PC to the DSP
> and back as the tutorial describes but so far I have not been able too.
> I have consulted a PhD student at my university who is researching DSPs
> and has worked with the C6713 before but he was unable to offer any help
> with why it wont work. I have noticed that in the SPRA633C document
> figure 14 on page 11 appears to have an error. From other documents I
> have seen it appears that the CONN DB9 connection is incorrectly
> labelled; pin 9 is shown as GND in SPRA633C when in other documents GND
> should actually be 5.
>
> If anyone can offer any advice or help it would be greatly appreciated
> as I need to get this working by the end of the week.
>
> Thanks in advance, Michael
>

_____________________________________
Michael,

On 3/22/2011 4:31 PM, m...@msn.com wrote:
>
> Hello, I am a final year student in the UK trying to get the
> TMS320C6713 DSP to interface with a touchscreen via a UART connection.
> I am using the DSK from Spectrum Digital and CCS 3.1. I am using
> SPRA633C document to get the serial port on the DSK to act like a
> UART. I have connected pin 36, 42 and 44 and DX1, DR1 and GND
> respectively on the J3 serial port. These pins connect to a MAX232
> chip which itself connects to a PC. I want to test the output of the
> DSP before connecting it to the touchscreen but currently I am just
> trying to get the tutorial code to work.
>
> I have tried using software to send characters from the PC to the DSP
> and back as the tutorial describes but so far I have not been able
> too. I have consulted a PhD student at my university who is
> researching DSPs and has worked with the C6713 before but he was
> unable to offer any help with why it wont work. I have noticed that in
> the SPRA633C document figure 14 on page 11 appears to have an error.
> From other documents I have seen it appears that the CONN DB9
> connection is incorrectly labelled; pin 9 is shown as GND in SPRA633C
> when in other documents GND should actually be 5.
>

I do not remember the pinout, but there are plenty of docs for a PC-DB9
connector.
Get you code working. If I was doing it, I would take a copy of the code
and cut it down so that it is a simple loop that outputs 0xFF then 0
continuously. With this you can verify your setup, configuration, and
timing by checking the output with a scope. Once you have some
established some 'knowns', focus on understanding and debugging your code.

mikedunn
> If anyone can offer any advice or help it would be greatly appreciated
> as I need to get this working by the end of the week.
>
> Thanks in advance, Michael
Michael,

From your description it sounds like you have a wiring error.

Just to test things out...

Have you hooked an oscilloscope or logic analyzer between the ground wire and
the TX wire on the DSP end to assure that data is actually being transmitted?

BTW:
you do know that the Tx/Rx wires have to be crossed as Tx on one device needs to
go to Rx on the other device.

Where in your circuit does the 9pin DB connector come into play?

If your going to a PC, then (I forget just which handshake wire) needs to be
permanently connected to ground so the PC thinks the DSP is 'ready to send'.
and/or the PC thinks the DSP is saying 'clear to send'.

R. Williams

---------- Original Message -----------
From: m...@msn.com
To: c...
Sent: Tue, 22 Mar 2011 17:31:12 -0400
Subject: [c6x] UART issue with C6713

> Hello, I am a final year student in the UK trying to get the
> TMS320C6713 DSP to interface with a touchscreen via a UART connection.
> I am using the DSK from Spectrum Digital and CCS 3.1. I am using
> SPRA633C document to get the serial port on the DSK to act like a
> UART. I have connected pin 36, 42 and 44 and DX1, DR1 and GND
> respectively on the J3 serial port. These pins connect to a MAX232
> chip which itself connects to a PC. I want to test the output of the
> DSP before connecting it to the touchscreen but currently I am just
> trying to get the tutorial code to work.
>
> I have tried using software to send characters from the PC to the DSP
> and back as the tutorial describes but so far I have not been able
> too. I have consulted a PhD student at my university who is
> researching DSPs and has worked with the C6713 before but he was
> unable to offer any help with why it wont work. I have noticed that in
> the SPRA633C document figure 14 on page 11 appears to have an error.
> From other documents I have seen it appears that the CONN DB9
> connection is incorrectly labelled; pin 9 is shown as GND in SPRA633C
> when in other documents GND should actually be 5.
>
> If anyone can offer any advice or help it would be greatly appreciated
> as I need to get this working by the end of the week.
>
> Thanks in advance, Michael
------- End of Original Message -------

_____________________________________
@Adolf Klemenz - Thanks for the info, this certainly seems to have helped. I can now see that the correct pins are either outputting 0 or a voltage using an oscilloscope, however the code from the tutorial still doesn't seem to let me output anything specific through the J3 serial port.

@Mike Dunn - At the minute I am just trying to get the tutorial code from TI working and so far I have not been successful. I know what I need to write to further develop the code once this basic UART interface is achieved.

@Richard Williams - I have tried checking pin 36, the TX pin, of the 80 pin serial port. All I get out is 5V not the specified values I am expecting. I have said for the tutorial code to alternate between outputting char c = 0x00 and c = 0xFF. I have not yet got this working. I have had my wiring checked by the lab technician so believe it to be correct. I have also connected up two COM ports on the PC to check hwo they work, they only needed Tx, Rx and GND to be connected to send and recieve data.

_____________________________________
Michael,
On 3/23/2011 10:33 AM, m...@msn.com wrote:
>
> @Adolf Klemenz - Thanks for the info, this certainly seems to have
> helped. I can now see that the correct pins are either outputting 0 or
> a voltage using an oscilloscope, however the code from the tutorial
> still doesn't seem to let me output anything specific through the J3
> serial port.
>
> @Mike Dunn - At the minute I am just trying to get the tutorial code
> from TI working and so far I have not been successful. I know what I
> need to write to further develop the code once this basic UART
> interface is achieved.
>
> @Richard Williams - I have tried checking pin 36, the TX pin, of the
> 80 pin serial port. All I get out is 5V not the specified values I am
> expecting. I have said for the tutorial code to alternate between
> outputting char c = 0x00 and c = 0xFF. I have not yet got this
> working. I have had my wiring checked by the lab technician so believe
> it to be correct. I have also connected up two COM ports on the PC to
> check hwo they work, they only needed Tx, Rx and GND to be connected
> to send and recieve data.
>

I have brought up dozens [or hundreds?] of someone else's 'working
apps'. I have chased my butt in circles many times because I did not
really understand what the code and hardware were supposed to do. After
going down that primrose path many times, I have adopted a personal
'plan B' if I do not get it working or close to working in a short
period of time.

Plan B [this works for me but I realize that everyone troubleshoots
differently].
1. Cut the code down to the smallest possible working unit and create a
scenario that performs something deterministic. Preferably outputting to
a display or scope.
2. Add back pieces of the code incrementally and test each step. Think
about functionality to determine the order.
3. No matter how well you think that you understood the code...
[/beginSoapBox
Now days many folks do not try to understand it - they think that they
can just download a magically working chunk of code and use. Sometimes
they are lucky and it works, but if something goes awry, they cannot
troubleshoot the code.
/endSoapBox]
when you go through this process, you will have different or improved
level of understanding.

Just my opinion...
mikedunn