Please ensure that the GND pin of ESP8266 module is connected to CY8C4245AXI-483 device ground.
For example project on interfacing PSoC with ESP8266, please go through the following web page.
I have already connected GND.
I tried again and found that for 'UART_PutString("AT+CIFSR\r\n");' serial terminal shows random values like EB, FC etc
and code stops at 'while(!HaveAnswer) Wait();' so I suppose there is no answer from device.
Kindly suggest what should be done.
1 of 1 people found this helpful
I tried your project using CY8CKIT-042.
I connected UART_1 to the KitProg's 12 and 12 and connected to a TeraTerm named "UART_1"
UART to my FTDI USB-Serial converter and Connected a TeraTerm named "UART"
At first when I ran your program,
I could see only
then after reset I saw
It seems that the UART is sending only 4 bytes,
so I checked your UART component Configuration
I noticed that TX buffer size was set to 40!
So I changed it to 4
Now after starting the program, I could see
So after restarting the program and saw "AT+CIFSR" I typed "Ready" and a Enter key.
Then WELCOME was shown.
And in the UART_1 TeraTerm my "Ready" was written.
I changed ascii instead of hex in my 'receive' part of serial monitor and now I am getting 'welcome' etc strings.
Also, I have made changes in the tx buffer size as per your suggestion.
But there is no communication between esp8266 and mcu, as the code execution doesn't go beyond ' while(!HaveAnswer) Wait();'
If my code is ok, are there any changes required in the hardware?
I'm glad to hear that you are now receiving strings OK.
Since I don't have esp8266, I can't try it on my side,
I would suggest you try the following.
(1) Connect esp8266 to the USB-UART (FTDI) and type commands from your terminal program
and note the exact letters you are sending and receiving. (PC <-> esp8266)
(2) Connect PSoC and USB-UART to PC and emulate esp8266 from your second terminal program (UART)
I suppose that you will find that your program is not writing or answering the strings just like (1)
(PC <-> PSoC)
(3) Modify your program to generate/expect exactly the same strings you noted in (1)
Hopefully, by doing these, the situation will get better.
Meantime I would add some timeout for the wait loop so that the program can retry.
I am not sure whether I have performed the steps you have suggested properly or not. The psoc-pc communication is working (step 2).
But I am still having issue with interfacing esp8266.
All I can help is something to do with PSoC and I have no knowledge about esp8266 nor what you want to do with that device.
Having written above, have you tried the step (1)?
What did you sent from your Terminal program.
And what was the response from the device?
Would you provide me some (expected) sample conversation between PSoC and esp8266?
PSoC > AT+CIFSR[EOL]
ESP8266 > Ready[EOL]
Note: [EOL] can be '\n', '\r' or "\n\r" ...
The serial monitor doesn't detect the com port when I plug in the kit programmer for UART_1.
Although the com port with ftdi for UART is identified.
I assume that you are using CY8CKIT-042.
Then you need to jumper connect
UART_1:rx P4 to KitProg's tx 12
UART_1:tx P4 to KitProg's rx 12
Meantime, if you are using KitProg,
your PC should detect COM port
even if the jumpers are not connected.
If it's the case, please download PSoC Programmer from the URL below
and update firmware of your kit. (From Utilities Tab > Update Frimware)
Yes I am using CY8C4245axi-483.
I have separated upper part of cy8ckit-059 to program the mcu.
Also, I have used jumpers to connect pins12(6), 12(7) to UART_1 and ftdi is connected to UART.
You wrote that the KitProg is not detected from your PC.
When you connect the KitProg, do LEDs on the KitProg light?
Mine (taken from CY8CKIT-043) lights LED3 Green and Power Orange.
And my PC is detecting the COM port even the KitProg is not connected to other MCU.
If none of the LEDs are lit, may be there is a problem in connection or the KitProg.
Both the power LED and LED3 light up. Only the com port is not identified.
1 of 1 people found this helpful
Is the Green LED blinking?
If so, please push RESET button and keep it for 5 seconds or so.
I kept the reset button pushed for a few seconds and it worked. Now the com port is identified.
And I managed to perform what you had done in previous answers, i.e. writing ready and pressing enter will display 'welcome' and 'ready' on 2 different com ports.
Now, the main question is regarding communication with esp8266, which is still unsolved.