- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am working on Cypress CY8CKIT-059, I want to use UART for serial communication with my laptop and want to use it to write AT commands to my Modem simultaneously. Is it possible to do that? as in pin configuration it shows only Pin 20 and 21 for UART(RX-TX).
Is there any other UART pair also available so that I can communicate the kit with my laptop as well as with the modem?
Or some other way for the debugging possible.?
Thanks & Regards,
Rajat bandejiya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We can have multiple UART modules in a project.
So I entered one for UART (to PC) and another for Modem, which I set the baud rate to 9600 just to be different.
I assigned pins like
Instead of a modem, which I don't have, I connected a USB-Serial interface to the P1[7], P1[6] and GND.
With the following program
=================
#include "project.h"
#include <stdio.h>
char str[128] ; /* print buffer */
int main(void)
{
int count = 0 ;
int uart_count = 0 ;
int modem_count = 0 ;
CyGlobalIntEnable; /* Enable global interrupts. */
UART_Start() ;
MODEM_Start() ;
sprintf(str, "UART/Modem Test (%s %s)\r\n", __DATE__, __TIME__) ;
UART_PutString(str) ;
CyDelay(10) ;
sprintf(str, "MODEM: I'm a modem!\r\n") ;
MODEM_PutString(str) ;
CyDelay(10) ;
for(;;)
{
if ((count % 4) == 0) {
sprintf(str, "UART %d\r\n", uart_count++) ;
UART_PutString(str) ;
CyDelay(10) ;
}
if ((count % 3) == 0) {
sprintf(str, "Modem %d\r\n", modem_count++) ;
MODEM_PutString(str) ;
CyDelay(10) ;
}
CyDelay(1000) ;
}
}
=================
On my PC TeraTerms showed
TeraTerm 1 (115200 baud)
TeraTerm 2 (9600 baud)
So, I hope that you can control modem with similar configuration.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Rajat,
You can use pins 20 and 21 (P12_6 and P12_7) of the CY8CKIT-059 for communication with the laptop. In this case the KitProg on the PsoC 5 kit acts as USB-UART Bridge. For communication with modem you can use any other pin and then connect the rx and tx of modem to those pins.
Thanks
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We can have multiple UART modules in a project.
So I entered one for UART (to PC) and another for Modem, which I set the baud rate to 9600 just to be different.
I assigned pins like
Instead of a modem, which I don't have, I connected a USB-Serial interface to the P1[7], P1[6] and GND.
With the following program
=================
#include "project.h"
#include <stdio.h>
char str[128] ; /* print buffer */
int main(void)
{
int count = 0 ;
int uart_count = 0 ;
int modem_count = 0 ;
CyGlobalIntEnable; /* Enable global interrupts. */
UART_Start() ;
MODEM_Start() ;
sprintf(str, "UART/Modem Test (%s %s)\r\n", __DATE__, __TIME__) ;
UART_PutString(str) ;
CyDelay(10) ;
sprintf(str, "MODEM: I'm a modem!\r\n") ;
MODEM_PutString(str) ;
CyDelay(10) ;
for(;;)
{
if ((count % 4) == 0) {
sprintf(str, "UART %d\r\n", uart_count++) ;
UART_PutString(str) ;
CyDelay(10) ;
}
if ((count % 3) == 0) {
sprintf(str, "Modem %d\r\n", modem_count++) ;
MODEM_PutString(str) ;
CyDelay(10) ;
}
CyDelay(1000) ;
}
}
=================
On my PC TeraTerms showed
TeraTerm 1 (115200 baud)
TeraTerm 2 (9600 baud)
So, I hope that you can control modem with similar configuration.
moto