- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to send a 24bit serial data using assembly code but I am not experienced in assembly at all. Can anyone help me on this? If there are any resources about data transfer in assembly like application notes or something please share with me.
By the way let me give some more detail about what I am trying to do. Basically I want to drive WS2812B RGB LEDs and as you may know they require strict timing for sending bits. I actually implemented a code in C, which using CyPins_SetPin() and Pin_Write() builtin functions but using them is not a good way to solve the issue I guess. Therefore I would like to implement this in Assembly language putting some "nop"s for the delay required sending bits.
So I am in need of all kinds of help,
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- 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
Why don't you use the SPI component? It will be much more efficient, and requires less code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The timing diagram of the LEDs is as follows,
Am I able to implement these timings with SPI? In SPI the frequency is fixed I guess.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, I forgot that these sort of LEDs have a strange interface. I guess you either
- use two timer components (maybe together with the SPI)
- or configure the SPI so that the difference between T0H and T0L matches one clock frame - 250ns (4MHz) should work. You need to prepare your data then properly though (0->1000, 1->1110)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apart from that - there are Cypress AppNotes regarding assembler programming with the PSoC.
- 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