- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the CY8C20234 CPU. Previously, I used assembly language to set Port 1 to STRONG with voltage to 2.4 VDC. The initial value was set in the PSOC Designer Pinout menu to 1.
or F, %00010000
or REG[IO_CFG], %00110010
and F, %11101111
This works correctly, putting out 2.4VDC on pin 1_2.
I have tried this in C, but the voltage on this pin end's up being 0VDC.
asm("or F, %00010000");
asm("or REG[0xDC], %00110010");
asm("and F, %11101111");
I think it might have to do with the register address which I borrowed from the assembly project's hex output. Though either way I am sure there is a better way to do this in C. What is the best way to do accomplish this in C?
Solved! Go to Solution.
- 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 figured it out.
IO_CFG |= 0b00110010;