- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
Currently I'm working on a robot which accepts command from MATLAB and performs actions corresponding to the command. Commands are basically the speed and positions of the robot. When I try to send speed for example 127 from MATLAB to psoc, psoc just accepts first digit of 127 i.e 1. I confirmed it by using UART_PutChar command and displayed the output in MATLAB/PUTTY. I need to send the complete value from matlab to psoc. I'm new to psoc, so it'd be great if someone helped me regarding this.
I'm using PSoC 5lp and UART_GetByte to recieve the data.
Thankyou.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoDh_4795826
You have put only the UART_GetByte inside the forever loop. Therefore, it will not transmit anything as the code is never executed. I am attaching a modified code. Please try this out and let us know if it works.
Best regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoDh_4795826
Are you sending 127 as characters - '1' '2' '7' which is 3 bytes?
Are you using UART_GetByte recursively within the forever loop or using interrupts? Can you share the code that you are using?
You can take a look at the UART_RX example or UART_FullDuplex code examples present for PSoC 5 LP.
Best regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Hari,
Sorry for the late reply, I was busy with my other project. What I'm
trying to do is send a number for example 200 from MATLAB to PSoC. I'm
using "GetByte" to receive those three digit numbers. But the problem is
PSoC is receiving just the first digit i.e 2. I'm new to PSoC, so i'm not
sure what changes needed to be made in order to receive the complete data.
Any help would be appreciated.
Regards,
Yogesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoDh_4795826
Can you share the code that you are using so that we can check it out? The simple demonstration of UART is provided in the CEs mentioned above.
Best regards,
Hari
- 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
Hi YoDh_4795826
You have put only the UART_GetByte inside the forever loop. Therefore, it will not transmit anything as the code is never executed. I am attaching a modified code. Please try this out and let us know if it works.
Best regards,
Hari