- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am fairly new to PSoC Creator but I was able to make pin assignments and bitbang an LED Strip. Basically, I have numerous GPIO pins as output and PSoC acts as an I2C Slave to another MCU. We have an I2C Protocol which goes GAXYS such that:
G - value is G which stands for GPIO
A - Action. Values can be W for write or R for Read,
X - Port Number
Y - Pin Number
S - State. Values can be H for High or L for Low (Only applicable for GPIO Write)
For Example,
GW00H means Write Port 0,0 to Logic Level High
GW41L means Write Port 4,1 to Logic Level Low
GR27 means Read Port 2,7 report H or L for the Logic Level
I will then do a conversion for the Port Number(X) and Pin Number(Y) ,whose value from I2C will range from 0x30 to 0x39, such that they will correspond to PSoC's port and pin number (0-9).
I will then need to Write to this specific Port Number-Pin Number the State (High or Low) or Read the state from this Port Number-Pin Number.
All my pins so far are declared in the .cysch and .cydwr. Is there a way to set/clear/read pins given the port number and the pin number?
I had tried to run CY_SYS_PINS_SET_PIN(2,2) in my main and attached an LED to the Port 2, Pin 2 but it did not turned on.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CY_SYS_PINS_SET_PIN(2,2) should work. Did you set the pin's drive mode to output strong and did you remover the hardware connection? What PSoC do you use, what board do you use??
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CY_SYS_PINS_SET_PIN(2,2) should work. Did you set the pin's drive mode to output strong and did you remover the hardware connection? What PSoC do you use, what board do you use??
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content