- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All
I apologize for being active on forum after a very long time.
Anyways, I am currently working in a direction to test I2C Master and Slave in a single PSoC4 - 049 42xx Prototyping Kit. The function that I want is:
1. Send Command from from Master to Slave.
2. Send response of the command from Slave to Master.
I have a single kit. So is there any possibility of testing 2 I2Cs of same PSoC4 with setting one as master and one as slave?
Thank you in advance.
- Shaunak Agastya Vyas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Send Command from from Master to Slave.
2. Send response of the command from Slave to Master. This will not work: A slave cannot send any data, but the master may read from slave.
2 I2Cs of same PSoC4 with setting one as master and one as slave? Yes, you will have to provide pullup resistors in the range of 2K Ohms and externally connect the sda and scl pins.
Bob
- 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
I would only recommend to
- put all the initialization stuff into a InitializeSystem() function
- remove the LED blinking into a separate function
- declare variables in main() as static, so they do not use the stack
to make main() shorter and better readable.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob
Please find attached the modified one. I am facing a problem of not being able to set UART on 4.0 and 4.1 pins. The reason to set them in such way is that I want to program PSoC4 with bootloader and debug the code using UART. I am avoiding MiniProg3 as of now. Please guide me for the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot have it all.
Ports >= 4 cannot be routed in your PSoC. So you may use an SCB based UART which will use P40 and 1, but this is already used by the second I2C.
You do not need to use the UART in your bootloadable project. Only the bootloader will need it, but after the bootload process it is freed again. You just have to care for the electrical levels on your pins, ie removing the I2C interface during Bootload.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If that is the case, then how can I debug the same project without MiniProg?
- 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
Is there any possibility for using three SCB Components instead of two in PSoC4?
Shaunak Agastya Vyas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a small "Resource Meter" tab on the very right hand side of the Creator window. This shows how many SCBs are available and (after a successful build) how many are used.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Got it, Bob. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are welcome!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have modified the things a bit for debugging purpose. I am using UART UDB instead of SCB. By this way, I am able to get two I2C SCB and a UART UDB. Though I am still not able to access those 4.0 and 4.1 pins for UART as they are for I2C. So I have set up the debugging environment based on LED Blinking. When slave receives command fro master, it blinks an on board LED. If anyone has better method of debugging, then please share.
Shaunak Agastya Vyas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For me, use one pioneer board from PSOC4_BLE kit, solder 5 wires to KitProg pins for PSOC4 kit, then you can debug and program without bootload.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can PSoC4 CY8CKIT-042 Pioneer kit be used as debugger for PSoC4 and PSoC5 both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PSOC5 kit- CY8CKIT-059 include kitprog, if you really want save money, you may use one CY8CKIT-059 program and debug PSOC4 and PSOC5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can PSoC4 CY8CKIT-042 Pioneer kit be used as debugger for PSoC4 and PSoC5
Not without modifying the pioneer kit with a soldering iron. This is why we suggest you to use a -059 prototyping lit, the snap-off part is a complete programmer.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob replay is correct.
Beside this, for some reason I did damage my pioneer kit Kitprog parts.
Use MiniProg3 is better, it can protect damage.