-
Hello, I have an ATtiny1614 chip and use it for my application written in C. There's no Arduino framework anywhere, I don't need it. Now I want to control WS2813 LEDs with this chip. Looks like there are only fancy libraries with tons of features and supported LED models, but on AVR all require the Arduino framework. Is there any chance to use this with plain C and no Arduino? Is it really so complicated that the whole framework is required to accomplish this? From what I've read, the timing-sensitive stuff is written in assembler anyway. I just need that. I can pass the colour data in an array and let the assembler code do the communication. How can I do this? What parts of the library should I extract? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
add a local Arduino.h file, add the ARDUINO_ARCH_AVR to compiler symbols, make sure the compiler symbol for F_CPU is correctly set, provide implementations for pinMode, digitialWrite, noInterrupts, Interrupts, micros, portOutputRegister, digitalPinToBitMask, and it should just work. Look at NeoAvrMethod.h, the assembler is in one of the methods |
Beta Was this translation helpful? Give feedback.
add a local Arduino.h file, add the ARDUINO_ARCH_AVR to compiler symbols, make sure the compiler symbol for F_CPU is correctly set, provide implementations for pinMode, digitialWrite, noInterrupts, Interrupts, micros, portOutputRegister, digitalPinToBitMask, and it should just work.
Look at NeoAvrMethod.h, the assembler is in one of the methods
void send_data_8mhz_800_PortD(uint8_t* data, size_t sizeData, uint8_t pinMask);
void send_data_8mhz_800_PortB(uint8_t* data, size_t sizeData, uint8_t pinMask);
void send_data_8mhz_400(uint8_t* data, size_t sizeData, volatile uint8_t* port, uint8_t pinMask);
void send_data_12mhz_800_PortD(uint8_t* data, size_t sizeData, uint8_t pinMask);
void send_d…