Toggle Pins with Assembly Code

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

How can I set or reset specific pins using Assembly language in PSoC4?

Thanks for your help.

0 Likes
1 Solution
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

I recommend to check following article.

PSoC 4 Pioneer Kit Community Project#100 – PSoC... | element14 | Cypress Kits

This project controls the WS2812B using the UDB block instead of software controlled GPIO.  This is a method to generate a high speed signal for PSoC.

Regards,

Noriaki

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Some questions from my side:

Why assembly and not the C-language API

If because of speed, what exactly do you want to perform with your project?

Bob

Anonymous
Not applicable

Hi Bob, first of all thank you for your reply!

As for your questions, I'd like to use Assembly because of speed and strict timing implementations. So I am trying to drive WS2812B RGB LEDs, which are controlled using a single GPIO pin. They have a very strict timing for evaluating 0's and 1's, therefore I need to implement some NOPs and have to toggle the GPIO pin in the required frequency.

Kindly check this post (Send 24 bit data with Assembly implementation in PSoC 4 ) for further information on the timing requirements.

I researched on how to toggle specific pins using Assembly in PSoC but unfortunately I couldn't come up with a  result 😕 I'd be very grateful if you could help me out.

Thanks!

0 Likes
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

I recommend to check following article.

PSoC 4 Pioneer Kit Community Project#100 – PSoC... | element14 | Cypress Kits

This project controls the WS2812B using the UDB block instead of software controlled GPIO.  This is a method to generate a high speed signal for PSoC.

Regards,

Noriaki

0 Likes