- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi i need to communicate USBUART (DMA, USUART_LoadInEP) to graph the data, but the program asks me the following configurations:
******************************************************************************************************
h = openserial(p,smode,translation,handshake,xchar,blocking,timeout)
p - port number, or port device name. Numbers are mapped in the following standard way
smode - string, communication parameters, in the form "baud,parity,data_bits,stop_bits"
translation - string, either "auto", "binary", "cr", "crlf" or "lf". Default is "binary".
handshak - string, either "none", "rtscts", "xonxoff" or "dtrdsr"
xchar - xon and xoff characters
timeout - timeout for reading? msec
blocking - boolean, blocking mode of the serial channel. If %t, Scilab hangs until all the requested characters are read from or written to the serial port. Default is %f.
h - string, handle to the serial port file returned by TCL
**********************************************************************************************************
which is chosen for this type of data ???
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That certainly looks like binary data interpreted by the receiver as numbers in text format. So the string, that doesnt really contain text or numbers in text format from the looks of it, must be interpreted by Scilab as data in binary format.
So first you should make Scilab take each received byte and print the decimal/headecimal value, not print it as a ascii character.
Then you can compare with what was sent to see how Scilab should be told to handle them.
At this point it is probably good to make a PSoC test project that sends a simple sequence of exactly known numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
USBUART is not a UART, its a usb pipe 'pretending' to be a UART type searial port.
Port number, thats for your operation system, where does the PSoC USBUART show up ?
smode - you can probably say anything here, since the USB transmission doesnt use it.
translation - thats between your PSoC code and the PC application (Scilab ?) what format is sent and how should it be interpreted. Dont ask us, what are you sending ?
handshape is is none, unless you decide to read handshake signals in PSoC USBUART and implement the logic
No handshake, no xon-xoff
Timeout - How long should the Scilab wait for the PSoC before deciding it doesnt work
Blocking - same thing, bot a PSoC issue, what should Scilab do if there is not data available ?
h can be good if you want to refer to the openend connection to the PSoC device
This type of data -- well -- whatis YOU type of data?
I dont want to be rude, but its your problem, you are trying to solve something, you write code on the PSoC, you select and configure components, you decide the data formats and data structures.
When you are using readymade components with readymade datastructures, you must understand them, in order to connect other computers and software. We can help, but it is your problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems you can not enter all data.
like this:
h = openserial(1, "9600, n, 8, 1")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That certainly looks like binary data interpreted by the receiver as numbers in text format. So the string, that doesnt really contain text or numbers in text format from the looks of it, must be interpreted by Scilab as data in binary format.
So first you should make Scilab take each received byte and print the decimal/headecimal value, not print it as a ascii character.
Then you can compare with what was sent to see how Scilab should be told to handle them.
At this point it is probably good to make a PSoC test project that sends a simple sequence of exactly known numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the eternal fun of different (binary) representations of numbers. They are all sent as a sequence of bytes over the communications channel, but their meaning and interpretation are different. Mix them up the wrong way and you will suffer, make them work together and you will vbe happy.