Skip to content

CH32V003J4M6: SoftwareSerial() does not work and the UART is not available. #157

Closed
@blopa1961

Description

@blopa1961

I know this is not a help forum, but since there's no information anywhere regarding my problem I'm posting it here; maybe someone can show some light on this.
I'm trying to convert my project:
https://www.instructables.com/An-SPORT-Compass-for-FrSky-Radio-Control-Telemetry/
to the CH32V003
The project is a simple protocol converter/interface which reads an I2C magnetometer and transmits the values using a serial port.
The SOP8 version of the CH32V003 is supposed to have both a UART and I2C interfaces available; however, since my design has a crystal (necessary for the UART time base), it seems the serial port TX pin (PD6) is in use by the crystal.
My connections are:
PIN Function
1 OSCI (24MHz crystal)
2 GND
3 OSCO (24MHz crystal)
4 VCC 5V
5 SDA
6 SCL
8 RX (URX?)
So far so good, but pin 7 is NOT TX; how am I supposed to connect the UART?
Will this chip actually work? If so, how do I remap the UART functions under Arduino (using IDE 2.3.3) and to which pins?
The output protocol is 57600 baud, inverted, half duplex and in fact the (16MHz) ATTiny85 in my original project uses a single pin TX/RX with SoftwareSerial and works flawlessly with both TX and RX on the same physical pin. It even inverts the signal without additional hardware.
Inversion of the signal is not a problem; I already designed an inverter/multiplexer for a hardware UART which I published it here:
https://www.rcgroups.com/forums/showthread.php?4511273-DIY-inverter-for-Pixhawk-to-FrSky%C2%92s-S-PORT-telemetry

So, to complete my project I need either SoftwareSerial to work or to be able to use the hardware UART in the CH32V003J4M6.
Please don't tell me to use another (bigger) version of the CH32V003 chip; the SOP8 ATTiny version works and I also designed an ATMega328P version if a bigger chip is the solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions