LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing the serial port of the ADSP-BF537 EZ-KIT Lite using the LabVIEW Embedded Module for Blackfin Processors

Hi everyone!

I was wondering if anyone can help me.... I am kind of new in this graphical programming module. I wanted to access (receive digital data) from the serial port of ADSP-BF537 EZ-KIT Lite and also access (Send digital data) to the USB Port of the same device. BUT, i do not know what VI's use.

Maybe someone can put me in the right direction. Tell me what i can use or examples that can help me.

Thank you very much.

0 Kudos
Message 1 of 22
(11,022 Views)

Hi JorgeP,

The best place to start would be the Example Finder. There are examples on SPI and UART. The Help Files also explain how to set up the Serial VIs. The following link provides the online version of the help. The Getting Started Manual is also useful. For more details about the specifics of the BF537 Kit, the manual is provided here. Hope this helps.

0 Kudos
Message 2 of 22
(11,014 Views)
Try the "Serial Compatibility" VIs on the Instrument I/O palette. They are primitive but they work. And the 'Bytes at Serial Port' function is included there.  This is a very handy function. It doesn't seem to be supported in the 'BF UART' palette.
Remember to set the UART value to 0 to use the RS-232 port on the EZ-Kit.


Message Edited by Macbeth on 02-05-2008 09:32 AM
0 Kudos
Message 3 of 22
(10,990 Views)
Thanks Macbeth.

I have some questions though.

See, I'm using the 'BF UART Open.vi', 'BF UART Control', and the 'BF UART Read.vi' to access the RS232 Port. However I haven't tested it yet since I am still encoutering major problems with building my project (my desktop PC automatically shuts down when I tried to build the sample projects found in the example finder as suggested by Nitin T).

My questions are:

1. Is my set-up (using the BF UART VI's) enough? or do I have to put a 'Serial Compatibility' VI before the 'BF UART Open.vi'?
2. Am i on the right track?
3. You said, "
Remember to set the UART value to 0 to use the RS-232 port on the EZ-Kit.". Why is that? do you have anyexplanation why?

Thank you very much.

P.S.
If you know a solution to my problem I would really appreciate it. I have problems building any project. My computer restarts every time i build my embedded project.

Thanks again.


0 Kudos
Message 4 of 22
(10,976 Views)
1. Is my set-up (using the BF UART VI's) enough? or do I have to put a 'Serial Compatibility' VI before the 'BF UART Open.vi'?

The main reason I suggest using the serial compatibility functions is because of the 'Bytes at Serial Port VI' which returns the number of bytes in the port's input buffer. There isn't a BF UART version of this and it is very useful to determine 'how many' bytes to read before calling a read function as there isn't any timout  capability...you try to read with no bytes at the port and you'll be stuck forever.

2. Am i on the right track?
Your most serious issue to solve is your PC problem(s).  Are you using USB to connect to the kit?

3. You said, "
Remember to set the UART value to 0 to use the RS-232 port on the EZ-Kit.". Why is that? do you have anyexplanation why?
Only that UART 0 is fed to a RS-232 converter to provide the proper signal voltages at the DB-9 connector. UART 1 simply goes to a header and you'll have to condition the signals as they are TTL if I remember correctly. You may have to check the setting of SW5 also for UART 1.


Message Edited by Macbeth on 02-07-2008 08:48 AM
Message 5 of 22
(10,968 Views)
okay, i finally figured out how the serial compatibility vi's work through the example finder and I have been experimenting sending/receiving data through my RS232 port. It is indeed more accurate on initializing what type of serial data you are working on. Just to clarify things, I can download and run this VIto my BF-537 processor right?

I have another question though, is it possible to use the USB port of the Blackfin 537 EZ-KIT Lite as a means of sending data back to my desktop PC? if so, how do you suggest i'd do that?

Regarding my problem: I have another posted message regarding that... I'd really appreciate it if you check the link out.

MAJOR PROBLEM: Building Embedded Porject

http://forums.ni.com/ni/board/message?board.id=beta2&thread.id=455



Thank you very much Macbeth!!!! You're really helping me a lot here. Smiley Happy








0 Kudos
Message 6 of 22
(10,943 Views)
Hi, Macbeth.

Correction: what i understood was the VISA Vi's found in the example "Basic Serial Write and Read.vi". hehehe! oooppsss... Smiley Tongue

I have no idea how the serial compatibility VI's works or even the BF UART Vi's. I need help again. I tried reading the help information but i still undestand.
Please bare with me since i am new at this. Smiley Happy

I would like to access the UART 0 port of my BF537 EZ-Kit Lite and send/transmit data using that particular port.
How do you suggest i'd do that?
What Vi's should I use?
How do i test if it's working (if it's really sending/recieving data or not)?

Thank you very much Macbeth! Smiley Happy
0 Kudos
Message 7 of 22
(10,925 Views)
Take a peek at these block diagrams. This code works and is very reliable for me. I use the traditional error clusters for data flow only since any error(s) can'tt be sent over a port if it doesn't configure correctly in the first place. You can build up similar VIs for reading & writing.  You probably won't have to worry about closing the port.


Message Edited by Macbeth on 02-12-2008 08:54 AM
Download All
0 Kudos
Message 8 of 22
(10,920 Views)
Hi Macbaeth,

Thanks again.

I'll just clarify some points on how these block diagrams work:

These are two serperate block diagrams right? I mean one can run without the other? or i need the two for them to work?
Are these two like subVI's?

For the serialinit block diagram:
1. This is just an example of how to open and configure configure the the serial port of the BF537 when built and run, am i correct?
2. or, at the same time, it SENDS error data from the error cluster found in the smaller case structure to the port?
3. What're the uses of the UART Ref in (0) and the UART Ref out? How did you do it? is it a constant or a control?
4. Also what's the use of the "Serial Open.vi" string constant found in the smaller case structure?

For the serialgetbytes vi:
1. what's the use of the "Serial_BytesAtPort.vi" string constant found in the smaller case structure?

Please bare with me again. Thank you very much for your patience and help Macbeth!
I appreciate it very much.

0 Kudos
Message 9 of 22
(10,906 Views)
Yep....theyare two diagrams that you can copy. (If I just give you the VIs you won't learn anything, and this embedded stuff is very unkind)
And yes, they represent two different VIs.
1)You first need to configure your selected port. That  means the buffer size, baud rate, data bits, etc.
2)Then, if you want to write to the port you would use a VI that is built like these but uses the 'Serial Port Write.vi'
3)If you want to read, you first test to see if there are any bytes TO READ. then pass that value to your read VI.
4)You can make a VI to close the port as well.
Error clusters allow traditional data flow...the error is not sent to the port. As you can see the canned VI doesn't have a error cluster output so I simply added my own.
You can get fancy here if you want but I can assure you...keep it simple in the embedded world.

The UART Ref in (0) is a control on thefront panel of the VI to allow you to select UART 0 or UART 1 (0 is the defalut)
TheUART Ref out is needed  to pass to the next VI. It's an indicator. After you configure the port, you need to pass the reference to your read or write VI.

The "Serial Open.vi" string constant found in the smaller case structure  is simple the purpose of the VI that can be used in debug. The error cluster won't act like traditional LabVIEW-you have to fill in some gaps like error handling. You can make that anything you want.

Same wiith the "Serial_BytesAtPort.vi" string constant found in the smaller case structure.

Using these VIs is similar to using file operations, you open, read or write and maybe close. Only you need to configure here as well.


Message 10 of 22
(10,894 Views)