- 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
Can it be that you used a PSoC4 Prototyping Kit CY8C-049... ? On that board the LED is connected to ground while in Pioneer the LED is connected to VCC.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is a change in how PSoC Creator is handling a HW pin that is tied to a constant zero. Previously Creator would automatically convert an output pin that is connected to a constant 0 into a software controlled pin with an initial value of 0. The hardware configuration of the LED on the board is such that driving a 0 will light the LED, so a Write(0) lights the LED.
With PSoC Creator 3.0 SP1, this automatic conversion is no longer done. That is because that automatic conversion causes some other use cases to not work. With 3.0 SP1 the pin remains a hardware pin with a logic 0 routed to the pin and driven out. With that configuration the Write() function (and the hardware handling of the DR register) controls the output enable for the pin (1 to drive and 0 to float). That means that with your configuration Write(0) causes the pin to float and the LED to go off, Write(1) causes the pin to drive the constant 0 which lights the LED. It has a similar impact to the code that attempts to toggle the pin, Write(~Read()). If the pin is currently driving it will read as a 0, which when inverted is a 1 which causes it to continue to drive.
If you want the previous functionality you should convert the design to use a software pin: Delete the Logic 0 and using the pin customizer uncheck the HW Connection checkbox. Then it will work exactly as before. That configuration will work in any version of Creator.