DSPRelated.com
Forums

Blackfin 561 UART port

Started by miracle_sksim December 5, 2007
Hi,

I will like to connect the blackfin to my compuer using the RS232
serial cable.

And i will be doing the cable myself as the pins of the Tx and Rx is
not the same for blackfin and the computer's serial interface.

So basically, i know that the UART port have two Tx and Rx pins which
i not sure which one I should solder onto the female connector.

Where the Computer side it is the Pin 3 and 2 for Tx and Rx bytes.

And is there any pins must i solder onto the connector as the UART
port only have the Tx and Rx pins because on the computer's serial
interface it has some of the control pins which seems that the UART
port does not need any of them.
Diego A. Botero G.

Hi
Well java classes are perfectly for you. I am using Java because is open
source. But using visualbasic is easier.

It is according to your final aplication.

If you use visualbasic you need the license, and etc.

But if you have visualbasic is very very easy.

The advantage of Java is that the Eclipse Environment SDK is free, do not
need license.

Chao

I will send you a file where there is a programm

2007/12/26, ss ss :
- Ocultar texto citado -

yupe i no need that fast speed pal.. 115200 can do it.

The Hyperterminal yupe can capture text but tat you must select it
yourself....

hmm.. what i need is that whenever the UART transmit information, it
will automatically save it to a file.

What I am doing now,

The keyboard is able to communicate with the blackfin where when i press
the keyboard "1", it will send the ascii code to the blackfin 561. Well it
works but the problem is tat i need the "1" ascii code to be constantly
sending from the PC because the UART port will only read the UART_RBR
register when there is new data coming in. So likewise when i press the
keyboard "2" it will replace the "1" ascii code and send it constantly. As
i am using interrupts for the UART registers. Ok this is 1 of the issue that
i need to solve. Which means i need some software or other programming
language to do so.

Another issue is that, which i mention above whenever UART transmit data
to the PC, the PC will save the data to a file. And each time the UART
transmit, it will save to a different file name(example file1, file2,
file3.... by increasing the number will do). Again either i need to use a
software or use another programming language to do so.

Please advise once again. Thanks.

regards,

----- Original Message ----
From: Diego A. Botero G. < d...@gmail.com>
To: ss ss < m...@yahoo.com>
Sent: Wednesday, December 26, 2007 10:49:37 PM
Subject: Re: [adsp] Blackfin 561 UART port
Hello Mr.

Well in order to process data received via RS232 in a computer I have
used Java. There are some classes available to manage the port, what I do
not know is if they are intended to use with Images.

I mean I do not know what about latencies. Another option to transfer
images to a computer is to use a USB 2.0 transceiver, you could connect it
to one PPI (56 MBps). Maybe would give you better performance, it is
according with the Bandwith that you need.

I need to check my archives to find the class if you say me that you do
not need High Bandwidth. Anyway RS232 can go up to 115200 bps.

Another option is to use the Hyperterminal to capture text, remember
just ascii codes.

Bye

2007/12/25, ss ss :

Hi,

First of all wishing you a merry christmas !!!!

Have understand the blackfin 561 UART example.

hmm.... do you have example on sending bytes over to the pc's side
from the blackfin 561 uart port.

And is it able to write to a file where those bytes been send by the
UART port ?
UART to PC's serial port (which those data will write/store to a
file) and likewise vice versa (from the file it transfer the information
thru the PC'side serial port to UART port)

Further explain,

example.

I have a data information store in blackfin's memory, let's said an
image/1 video frame (480 by 720) and tranfer out to PC using the UART port
and on the PC side it will receive and write to a file which store those
tranfer bytes. (UART to PC)

And again if i want to view the image/ 1 video frame, need to
transfer back to the blackfin's memory. (PC to UART)

So there is two issue.

1) How the PC'side able to save those transfer bytes to a file ?
2) Transfering an amount of bytes automatically to and from using
UART.( example, there are (480 x 720 x 2) bytes of data, it will stop after
the last byte, it will transfer again if there are new bytes)

----- Original Message ----
From: Diego A. Botero G. < d...@gmail.com>
To: ss ss
Sent: Friday, December 21, 2007 1:39:37 AM
Subject: Re: [adsp] Blackfin 561 UART port

HOLA

Did it works???????
Chao

2007/12/19, Diego A. Botero G. :

Hello Mr.

Here is one program that handles tx from uart using POLLING.
This program process images, in order to find a path, and TX the
orientation of the path via the RS-232 port.

I hope this can be usefull.
Sorry it is commented in spanish.

The main parts for handle the tx of the uart using polling are
this:

/*Inicializacion de la UART*/
*pUART_GCTL=0x0001;
*pUART_LCR=0x0083;
*pUART_DLH=0x0000;
*pUART_DLL=0x0082;//0x0041;
*pUART_LCR=0x0013;

//uart
if(dato_por_transmitir) //This is one
flag of my program
{ if(*pUART_LSR & 0x0040) //Checking if the
transmit buffer is empty and check one flag that I am using.
*pUART_THRo;
dato_por_transmitir=0;
}
Using this program you can check again which is the ouput from
the DB9 connector of the DSP, if pin2 or pin3(I have very bad memory and i
do not remember).

When you run the program OUTPUT PIN MUST CHANGE its voltage.

Pin2 ------________--------_____________---- signal in the
output will have data when dsp is running. so the voltage can change, you
can use a voltmeter, or better an osciloscope.
Pin3-----------------------------------
pin 5 gnd

I recomendate you to use another tool different from
Hyperterminal, because hyperterminal just show you data when you send ASCII
data.

There is an excellent terminal called XCTU is from Maxstream.
http://www.digi.com/support/productdetl.jsp?pid352&osvidW&tp=4&s16
Link to download XCTU

I mean if you receive from the DSP a 0x01, the Hyperterminal
does not print it, because it does not have an equivalent ascii.

So Maybe whe you run the original program and you want to see
the data from hyperterminal, you don see anything because data from original
program is a number from 0 to 90, that corresponds to an angle of my
algorithm.

SO is very important that you use another RS232 terminal
program.

Do not forget to configurate this way your terminal: NO
Hardware Flow control--8 bits-1stop bit------I think 57600bps, (not sure if
115200bps for this configuration).

then modify the program and where is the assignment of the
Transmit Hold Register put a fixed data, so you know that in the
Hyperterminal you will see a fixed data for example 'H'

//uart
if(dato_por_transmitir)
{ if(*pUART_LSR & 0x0040)
*pUART_THR='H'; //a FIXED DATA
dato_por_transmitir=0;
}
Anything you need do not hesitate to ask me again.
Good LUck
Buena suerte

2007/12/19, ss ss < m...@yahoo.com >:

Hi,

I have try for several days on working with the blackfin 561
UART example but could not get anything out from the hyerterminal screen, i
have follow your setting for the hyperterminal.

And from the UART example of blackfin 561, it said that it
needed to key in a '@' symbol but i could not key that symbol into the
hyperterminal. So how can i key something into it ?

Or is there any simple program for running and testing
whether the ports are working ?

Thanks once again.

rgds,

----- Original Message ----
From: Diego A. Botero G. < d...@gmail.com>
To: ss ss
Sent: Wednesday, December 12, 2007 5:27:31 PM
Subject: Re: [adsp] Blackfin 561 UART port
I am not sure if the cable is directly or crossed.

I have no one ez kit here, i am on vacation at this moment.

In order to be sure check the following things:

With a VoltMeter check folllowing things, it is usefull for
any RS232 device

Suppose you have these 3 devices:
----------------------------
Device
1
pin2-------- Voltage: -12
pin3-------- No Voltage

pin 5 ------- Gnd

------------------------------

----------------------------
Device
2
pin2-------- Voltage: -12
pin3-------- No Voltage

pin 5 ------- Gnd

------------------------------

----------------------------
Device 3

pin2-------- No Voltage
pin3-------- Voltage= -12

pin 5 ------- Gnd

------------------------------

************************************************************************
If you want to connect :

-----------
Device 1 with Device 3

pin 2----------------pin2

pin3-----------------pin3

pin5 ---------------pin5

-------------
************************************************************************

************************************************************************
but if you want to connect:
-----------
Device 1 with Device 2 : You must use a
crossed cable

pin 2----------------pin3

pin3-----------------pin2

pin5 ---------------pin5
-------------

Other pins of DB9 does not matter if you do not use flow
control.

Check the voltages, it is usefull for almost all rs232
connections
When there is no voltage in pin2 means that this is an
input(generally)
But if there is voltage in pin 2 means that this is an
output.

It is this way because if you need to connect 2 computers,
both are DTE.
So you need to cross the cable.

But if you need to connect 1 computer with 1 modem, you use
a direct cable.
The computer is a DTE and the modem is a DCE.

It means for a modem the TX is an input, is what it must
transmit.
And for a computer the TX is an output.

I am not totally sure but If my memory does not fail

You must use a crossed cable. Both are DTE's
Good luck
2007/12/11, ss ss :

Hi,

I have done the serial cable connection.

And I will like to confirm again that the blackfin 561
UART port can be directly connected to the serial port of the computer, am i
right??

Because i dont want to damage the board later on.

Thanks

Never miss a thing. Make Yahoo your homepage.

--
Att.
Ing. Diego Andr Botero Galeano
BSB Ingenier.
Bogota - Colombia.
Never miss a thing. Make Yahoo your homepage.

--
Att.
Ing. Diego Andr Botero Galeano
BSB Ingenier.
Bogota - Colombia.

--
Att.
Ing. Diego Andr Botero Galeano
BSB Ingenier.
Bogota - Colombia.
Looking for last minute shopping deals? Find them fast with Yahoo!
Search.

--
Att.
Ing. Diego Andr Botero Galeano
BSB Ingenier.
Bogota - Colombia.

2007/12/5, miracle_sksim :
>
> Hi,
>
> I will like to connect the blackfin to my compuer using the RS232
> serial cable.
>
> And i will be doing the cable myself as the pins of the Tx and Rx is
> not the same for blackfin and the computer's serial interface.
>
> So basically, i know that the UART port have two Tx and Rx pins which
> i not sure which one I should solder onto the female connector.
>
> Where the Computer side it is the Pin 3 and 2 for Tx and Rx bytes.
>
> And is there any pins must i solder onto the connector as the UART
> port only have the Tx and Rx pins because on the computer's serial
> interface it has some of the control pins which seems that the UART
> port does not need any of them.
>
>
>

--
Att.
Ing. Diego Andr Botero Galeano
BSB Ingenier.
Bogota - Colombia.