DSPRelated.com
Forums

Re: Storing Image In Blackfin 561 Memory By UART port

Started by "Diego A. Botero G." January 24, 2008
Hello Mr
There two ways to do it.
You can use a DMA channel or just do it manual.
I suggest you to begin it manually.

One problem in transmitting the image is that if you are not using somekind
of protocol(Xmodem, Modbus,.., or one protocol defined by you) you can loose
some data.

For begin you can do something like this:

Suppose you have a global variable IMAGE
unsigned char * IMAGE;
IMAGE=0x3000000//the adress you want
if you are polling the uart:
main(){
...
while(1)
{
IF(flag _New_data)//Polling to receive Buffer bit status.
*IMAGE=*pUART_RBR
image++;
}
}
}
You also need to do somekind of sync if you want to tx more than one image.
Maybe you can use a Finite state machine in Blackfin to handle some headers
defined for sync.

Bye
2008/1/24, miracle_sksim :
>
> Hi,
>
> Ok what i have on hand is that i have a .dat image file which i want
> to store it to the blackfin's memory.
>
> I know that by using the memory -> fill you can store it to the memory
> location that can be specify.
>
> I have created a Visual Basic interface for the serial communication
> to the UART port of blackfin 561 board.
>
> I notice that after transfering the .dat file data to the UART port
> and storing each byte to a memory location and i view it using image
> viewer, i cant see the image.
>
> If i was using the memory fill procedure to fill the .dat file data to
> the memory location, i am able to view the image nicely using the
> image viewer.
>
> I checked the starting memory location (0x3000000) of both methods
> that fill the location and found out that the data at the location is
> different for both. As using the UART port, it stores the ascii value
> to the memory location where else the memory fill method fills the
> location of what is written in the .dat file. I not sure whether it is
> right to said that please correct me if i am wrong.
>
> So anyone can help me out how can i rectify this problem thanks.
>
> regards,
>
>

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