
“Pasta ingredients and procedure:”
configuration No JTAG !! is in code but
configuration No USB serial !!…
find file usb_serial.cpp and Commented the content of USBSerial::begin like this
void USBSerial::begin(void) {
#if BOARD_HAVE_SERIALUSB
// usb_cdcacm_enable(BOARD_USB_DISC_DEV, BOARD_USB_DISC_BIT);
// usb_cdcacm_set_hooks(USB_CDCACM_HOOK_RX, rxHook);
// usb_cdcacm_set_hooks(USB_CDCACM_HOOK_IFACE_SETUP, ifaceSetupHook);
#endif
}TDV = 0 to 30 seconds .Time Display Value display alternately clock or temperature(-40*C , +99*C) in 1 to 30 seconds per minute
The DS18B20 is have a pull-up resistor 4K7 (not critical values for short cable).

stephen
it would prevent quite possibly exceeding the combined mA limit for the chip.
it would also work towards unifying the display segments intensity.
stephen
It may work for some time, but it is definitely wrong approach (not to use the anode’s resistors, 8 pcs.).
Long time back I did it in a following way:
1. when not multiplexing the segments, choose R1-8 such the display segments lit normally (ie. 3mA current per segment needed, thus the resistors = (3.3V-1.6V)/0.003A = 566ohm)
2. when multiplexing 4 digits, the 8 resistors (7 segments + dot) shall be 566/4 = ~150ohm each..
Or something like that.
The next step is a relay and buttons.
An old project [youtube]https://www.youtube.com/watch?v=fLRitUlOkIY[/youtube].
Thanks for read my ugly project…sincerely!
but for 7 segment leds, it is better to be safe and add some resistors perhaps, otherwise 1’d likely be playing dice with the magic smoke monster
it seemed in this case it is somewhat ‘safe’ as the multiplexing makes it works like some sort of pwm preventing too much heat build up on the stm32
from STM32F103C8 datasheet (MapleMini, BluePill and others):
DocID13587 Rev 17 page 65/117 – Electrical characteristics
Output driving current
The GPIOs (general-purpose inputs/outputs) can sink or source up to ±8mA, and sink or source up to ±20mA (with a relaxed VOL/VOH) except PC13, PC14 and PC15 which can sink or source up to +/-3mA. When using the GPIOs PC13 to PC15 in output mode, the speed should not exceed 2 MHz with a maximum load of 30 pF.
In the user application, the number of I/O pins which can drive current must be limited to respect the absolute maximum rating specified in Section 5.2 :
• The sum of the currents sourced by all the I/Os on VDD, plus the maximum Run consumption of the MCU sourced on VDD, cannot exceed the absolute maximum rating IVDD [150mA] (see Table 7).
• The sum of the currents sunk by all the I/Os on VSS plus the maximum Run consumption of the MCU sunk on VSS cannot exceed the absolute maximum rating IVSS [150mA] (see Table 7).
2. when multiplexing 4 digits, the 8 resistors (7 segments + dot) shall be 566/4 = ~150ohm each..
Or something like that.
would you like to re-think that ?
multiplex – drive one at a time, fast enough that they don’t flicker.
stephen
Thinking makes me a big pain..
The common cathodes (4 in this case) require an external switch as well – the max current in particular common cathode will be 8x I_per_segment, which is also off the limits, sure..
the displays are multiplexed, so only one is active at a time.
stephen
And of course you need external switches for the common cathodes (ie low side npn transistor or nfet) as the currents of the active segments sum up and worst case the cathode current of the particular digit will be 8x Isegment, way off the stm32 current limit.
PS: the popular MAX7219 does not require resistors in the segments as it uses a “current source” in the segments (and those currents are programmable). That is a different scenario to our stm32 as the stm32 does not possess such a “current sourcing” capability.
oh, for setting the clock, increase the pwm for the current digit and decrease it for the other digits.
bright for the digit being set, dimmed down for the rest.
stephen
If you need 8 digits, there are plenty of inexpensive MAX7219 seven segment modules.
But I will agree that it’s fun to wire the individual displays and write the code to make it work.
Now Luckylight is on the table…
LUCKYLIGHT KW4563ASA COMMON ANODE
No special modification of USB library requirement just cancel the jtag function
One rows of pins solder directly to the pcb
DS18B20 senzor display
HMI on serial USB maple port, check HMI with +++ ;
DFU still not working well
TDV Time to alternate display clock or temperature in EEPROM, value 1-30 seconds
Link to new version of this RTC CLOCK :
https://drive.google.com/drive/folders/ … sp=sharing





