Andyroc / DMX_Stm32F4

3 stars 0 forks source link

stm32f103c8t6 edit please #1

Open elektroservis opened 3 years ago

elektroservis commented 3 years ago

Thank you for this beautiful project.

Is it possible to edit stm32f103c8t6

I'm getting this error

sketch\DMX_Stm32f4_lib.h: In function 'void DMX_begin()': DMX_Stm32f4_lib.h:31: error: 'struct RCC_TypeDef' has no member named 'AHB1ENR'; did you mean 'AHBENR'? RCC->AHB1ENR |= 1 << 22; ^~~ AHBENR DMX_Stm32f4_lib.h:37: error: 'DMA2_Stream5' was not declared in this scope DMA2_Stream5->CR = (6 << 25) | (1 << 11) | (1 << 10) | (1 << 8) | (1 << 6); // Ch:6,WORD,MINC,CIRC,Mem2per ^~~~ sketch\DMX_Stm32f4_lib.h:37:5: note: suggested alternative: 'Stream' DMA2_Stream5->CR = (6 << 25) | (1 << 11) | (1 << 10) | (1 << 8) | (1 << 6); // Ch:6,WORD,MINC,CIRC,Mem2per ^~~~ Stream exit status 1 'struct RCC_TypeDef' has no member named 'AHB1ENR'; did you mean 'AHBENR'?

Andyroc commented 3 years ago

This project work only with stm32f4 series and installed arduino core by st (https://github.com/stm32duino/Arduino_Core_STM32) stm32f1 series has another register map and need to write new project

elektroservis commented 3 years ago

I understand ... how to connect the rs485 you use for DMX receiver. Please share the schema

Andyroc commented 3 years ago

this prroject/lib works only for sending dmx data, not for recieving, main point of this project is a sending a multiple output dmx data and dont use cpu. for recieving dmx maby you need to check libs using hardware serial ports or write algoritm to recieving dmx looks on datasheets of dmx protocol dmx timings and protocol http://www.dmx512-online.com/dmx512_packet.html dmx output shematic simple example https://www.nickv.codes/blog/wp-content/uploads/2009/12/dmx1-e1262175094890.png dmx input example shematic(left part with sn75176) https://lh3.googleusercontent.com/proxy/p3mcl_BD8nb6PHGsTs0NpvAwPXFNd6iopBrJo0GQWs-e-sv2zinOdOM8WJt9tnBfWdqGHf6XGD0KLLnpCML47yjY6Ya3 and dont forgot: examples i send use a 5v but stm works on 3,3v your need to use only 3.3v instead 5v