nwxt appr. to canusbrelay

This commit is contained in:
Edward Emelianov
2021-07-23 23:37:52 +03:00
parent 813549e0f2
commit 4fc13b2b11
21 changed files with 647 additions and 7988 deletions

View File

@@ -1,10 +1,21 @@
Simple code for CAN/USB development board
Simultaneous work of USB CDC (PL2303 emulation) and CAN
CAN/USB management of 2 relays and some other things
===================================================
The device can also work as USB-CAN converter.
CAN protocol is quite simple. The node receives data to selected CAN ID, transmission done with the
ID = CANID + 0x100.
Pinout:
PB0 - LED0 - short blink when message received
PB1 - LED1 - shine when line OK
PB8, PB9 - CAN Rx/Tx
PA11. PA12 - USB DM/DP
- PA0/1 - Relay0/1
- PA2..5 - Button0..3 (user buttons)
- PA6/7 - ADC inputs through resistive divider (0..5 and 0..12V)
- PA8..10 - PWM0..2 outputs (opendrain through SI2300, 5 or 12V)
- PA13/14 - SWD; the SWD pin +3.3V connected through 22Ohm resistor
- PA11. PA12 - USB DM/DP
- PB0..PB7 - CAN ID
- PB8, PB9 - CAN Rx/Tx
- PB12..15 - LED0..3 outputs (direct outputs without any protection!!!)
The pins LEDr0 and LEDr1 are indicated relay works (12V through 2.2kOhm resistor)