you have now declared the thread solved when it is not!
the problem is only temporally masked and will rear its ugly head when you enable another transmitter
you have now declared the thread solved when it is not!
the problem is only temporally masked and will rear its ugly head when you enable another transmitter
Warning I'm not a teacher
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Since the output on that specific chip will remain as driven output, and if you insist on using this, a crapy solution maybe to add a diode at the output before the pin is connected to the bus.
The cathode to the PIC usart output and anode to the bus.
Like an OR connection of all the PICs that will be in parallel. Then a pull up will hold line to HIGH state.
This is subject to capacitances over the bus and the pull-up resistor may not be able to charge that capacitances fast enough but you can test it and see if your are OK with the speed you may obtain.
The chip that you found to be faulty, may have been hit by ESD charge. Are you familiar with ESD protection? Are you taking measures when you handle ESD sensitive components?
Ioannis
Last edited by Ioannis; - 24th September 2024 at 12:32.
I "like" the 16F1937, but I have no allegiance towards it (I only have 15 on hand, I'll keep them for "something else").I'm starting the slow/annoying process of choosing another PIC, with added requirement for ODCON register.
I don't have carpet, and that's the extent of my ESD protections. I think I somehow messed it up when I first powered it up on the breadboard. It's a real possibility that I applied power to the wrong pins.
Last edited by Demon; - 24th September 2024 at 18:11.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Well the carpet is one thing. Even if you just walked the room and returned back to you chair (even worse if it has suspension), then you may well have charged enough to destroy the chips.
You have to remember to ground yourself just before you touch components or even better have a wrist band to permantly ground your body (through a high value resistor of course).
ESD can destroy just a tiny part of the chip, enough to drive you crazy!
Ioannis
The USART section in the datasheet for your device will tell you if you should set/clear the TRIS bits for the TX/RX pins.Am I supposed to set TRIS as well?
If the chip supports open-drain mode then you just need to setup the TX pin to enable it at startup (ODCONC.6 = 1).
There's no need to set and clear it, and you won't need to enable/disable TXEN anymore either.
Add a pullup to the TX line (you say you already have one), and you can connect all the TX lines from the different pics together now.
If your pic has PPS you'll probably need to set that up too to assign the pin to the UART TXD function.
PPS output functions aren't typically enabled by default.
I've misunderstood/misinterpreted the data sheet before.Seriously, I read the EUSART section and my eyes gloss over when they start making distinctions between half-duplex, full-duplex, synchronous, asynchronous...)
Something like..?
TRISC.7=1
ODCONC.6 = 1
Loop:
TX, RX, rinse repeat
I would have thought you need to reset ODCONC.6 to "standard push/pull"...? (Possible example of not always understanding what the datasheet "means").
Yes, I figured that much. There's just so many peripherals available (coming from a guy that started with a 16F628).
EDIT: I just rechecked the EUSART section (starts at page 543), and they never mention ODCON (last occurence is at page 233).
The datasheet says very little about ODCON:
![]()
Last edited by Demon; - 25th September 2024 at 21:28.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Bookmarks