The MASM Forum

Projects => Rarely Used Projects => RadAsm IDE Support => Topic started by: KetilO on August 05, 2022, 06:32:47 PM

Title: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on August 05, 2022, 06:32:47 PM
I have uploaded a complete RadASM package to Sourceforge so you can quickly get started programming this clever little MCU.
It includes the gcc compiler so the download is almost 300MB.

Supported boards:
STM32F100 Discovery
STM32F103 BluePill
STM32F401 BlackPill
STM32F407 Discovery
STM32F411 BlackPill

New boards can be added.

https://sourceforge.net/projects/radasm30/files/RadSTM32/ (https://sourceforge.net/projects/radasm30/files/RadSTM32/)

Unzip to C:\RadSTM32

The package also includes STMSpy. It gives you easy access to documentation and debugging.

You can buy the device on Ali Express
https://www.aliexpress.com/item/1005003880238896.html (https://www.aliexpress.com/item/1005003880238896.html)

You can download RadASM30 release and sources here:
https://sourceforge.net/projects/radasm30/files/Release/ (https://sourceforge.net/projects/radasm30/files/Release/)

Let me know if there is any interest in this project.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on August 05, 2022, 08:37:00 PM
I am currently working on a portable all in one electronics instrument.

o LC Meter. Measure inductors and capasitors.
o Voltmeter. +/-20V
o Logic scope. 4 bits logic analyser, 15K sample buffer,  1Hz to 20MHz sample rate.
o Wave generator. Sine, triangle, squear and sawtooth, 100Hz to 10KHz.
o PWM Output. 1Hz to 20MHz.
o DDS squear wave. 1HZ to 1MHz, 1Hz resolution.
o Scope. 10MHz at -3db.

It is just incredible what yo cam nake with this MCU. :biggrin:

The zip contains some images.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: TimoVJL on August 05, 2022, 09:31:02 PM
Looks good :thumbsup:
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: bluedevil on August 19, 2022, 06:09:42 PM
Hello Ketil,
You have upgrade RadASM from 3.0.0.9c to 3.0.1.0, thank you.

Did you update the sources that you provide here:

https://sourceforge.net/p/fbedit/code/HEAD/tree/RadASM30/RadASM30/


I have checked the dates of the sources but they seem not updated?

BTW, i have ordered a new STM32F103C8T6 and waiting for it. Thank you!
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: NoCforMe on August 19, 2022, 06:45:49 PM
Quote from: KetilO on August 05, 2022, 08:37:00 PM
I am currently working on a portable all in one electronics instrument.

I'm very curious about this project; the pictures have whetted my appetite. Any more info on this? Schematics?
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on August 21, 2022, 10:30:51 PM
Hi,

Thanks for your interest in this project.
The zip contains the schematics.

KetikO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: NoCforMe on August 22, 2022, 05:30:45 AM
Interesting, thanks.

But I don't see some things: the display, and the L and C measurement circuitry. (Interested in that latter thing; I built a L-measurement attachment to a DVM that works pretty well. Would like to be able to at least ball-park measure L and C.)
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on August 23, 2022, 03:56:12 AM
Hi,

Someone else designed the LC meter.
You can find it here:

http://electronics-diy.com/lc_meter.php (http://electronics-diy.com/lc_meter.php)

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: NoCforMe on August 23, 2022, 04:02:22 AM
Thanks again. Sorry to complain, but they say

Quote... programmed PIC16F628A microcontroller ...

so no code, have to buy their chip. Not totally DIY. That's a different MCU from yours, right? Did you program your own?

=========================================================

Ackshooly, not a bad deal for $30 (http://electronics-diy.com/product_details.php?pid=730&name=ESR%20Meter%20/%20Transistor%20Tester%20/%20LC%20Meter%20Kit%20-%20Blue%20Backlight%20LCD): ESR meter/transistor tester/LC meter all in one ...
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on August 23, 2022, 07:38:23 AM
Hi

Just ignore the pic and display. Only the analog part is used in my project.

Included ar all the schematics and pcb design. Note that the lcd and push buttans are on the back side of the pcb.
Also note that the connections to the lcd might be different from the one i am using.

NOTE
This is only the prototype to test my design. When everyting is working and well tested i will design a single pcb.

KetilO

Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on August 24, 2022, 07:56:24 PM
Hi,

The RadSTM32F103C8T6 package contained the STNBuild.exe file.
Recently Windows reported this as a virus.

You should delete the whole package and download and install the new RadSTM32 package:

https://sourceforge.net/projects/radasm30/files/RadSTM32/RadSTM32.zip/download (https://sourceforge.net/projects/radasm30/files/RadSTM32/RadSTM32.zip/download)

See more in the first post.

KetilO



Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on September 19, 2022, 06:21:20 AM
I have created a SimCad addin. It lets you create and edit simcad files  (*.cad simple drawings) in RadASM30 and RadSTM32.

Unzip SimCadAddin.zip to C:\RadSTM32\Addins

Version 1.0
-----------
Initial release.
Version 1.1
-----------
o Fixed bug where adding a symbol did not work as it should.
o It is now possible to have more than one cad file open.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on September 28, 2022, 10:59:22 PM
I have uploaded my electronics instument project to Sourceforge:

https://sourceforge.net/projects/radasm30/files/RadSTM32/Projects/LCMScopeWaveDVM.zip/download (https://sourceforge.net/projects/radasm30/files/RadSTM32/Projects/LCMScopeWaveDVM.zip/download)

Note:
There are still several software improvements to be done on the digital oscilloscope.

Specifications:
---------------
LCMeter.
o Capacitor: 1pF to 1uF
o Inductor: 1nH to 100mH
o Accurancy: 1%

Voltmeter.
o +/- 0 to 19.99 volts
o Accurancy: 1% (depends on MCU 3V3 regulator).

Logic analyser.
o 4 bits
o Trigger on any bit level combination.
o Sample buffer up to 15K
0 Sampling rate 1Hz to 20MHz

Wave generator.
o Sine, Triangle Squear, Sawtooth and Reverse Sawrooth.
0 100Hz to 10KHz in 1, 2, 5 steps.
o 250mV to 3V Vpp output.

PWM Outut.
o 1Hz to 26.67MHz.
o Resolution: Any frequency that can be obtained by
  dividibg the 80MHz clock.
o Ouput: 3V.

DDS Squear wave.
o 1Hz to 999999Hz
o Resolution: 1Hz
o Ouput: 3V.

Digital Oscilloscope.
o Bandwidth (-3db) 10MHz
  1.5MHz for 20mV, 50mV and 100mV / div ranges.
o Pre trigger
o Auto. Analyses input and auto adjust settings.
o Trigger on rising / falling edge.
o Single shot 9K buffer.
o AC/DC selection.
o 20mV to 2V / div in 1, 2, 5 steps
o 10nS to 500mS / div in 1, 2.5, 5 steps
o Horisontal, Vertical and Triiger position settings.
o 15 MHz Frequency counter.


Where to get the parts.
-----------------------

STM32F103C8T6 (Bluepill) MCU:
-----------------------------
https://www.aliexpress.com/item/1005003880238896.html (https://www.aliexpress.com/item/1005003880238896.html)

1.8 inch LCD:
-------------
https://www.aliexpress.com/item/1005004553437723.html (https://www.aliexpress.com/item/1005004553437723.html)

B0505S-1W Voltage converter:
----------------------------
https://www.aliexpress.com/item/1005003071626685.html (https://www.aliexpress.com/item/1005003071626685.html)

Push buttons:
-------------
https://www.aliexpress.com/item/32900722317.html (https://www.aliexpress.com/item/32900722317.html)

Reed relays:
------------
https://www.aliexpress.com/item/1005002955329460.html (https://www.aliexpress.com/item/1005002955329460.html)

Relay DPDT 5V:
--------------
https://www.aliexpress.com/item/4001077712819.html (https://www.aliexpress.com/item/4001077712819.html)

Electrolytic capasitors kit:
----------------------------
https://www.aliexpress.com/item/32994162214.html (https://www.aliexpress.com/item/32994162214.html)

Capacitors kit:
---------------
https://www.aliexpress.com/item/33007220515.html (https://www.aliexpress.com/item/33007220515.html)

40pF trimmer capacitor:
-----------------------
https://www.aliexpress.com/item/4000222152928.html (https://www.aliexpress.com/item/4000222152928.html)

Resistor kit:
-------------
NOTE: Does not contain all the needed values.
https://www.aliexpress.com/item/33004978023.html

TLE2072, TL074, TL712 and LM311:
--------------------------------
https://www.mouser.com (https://www.mouser.com)

Other parts:
------------
1  1.0 uF film capacitor
2  1.0nF film capacitor 1%
2  47uF tantal capacitor
4  22uf tantal capacitor
1  10uf tantal capacitor
1  680K metal film resistor 1%
1  180K metal film resistor 1%
1  120K metal film resistor 1%
1  82K metal film resistor 1%
1  820 ohm metal film resistor 1%

https://www.mouser.com (https://www.mouser.com)


OP amp offset and PWM output error correction.

Digital voltmeter:
------------------
Short the inputs.
If you dont get a 0.00V reading the offset must be corrected.

If the OP amp and PWM has no error
#define DVM_OFFSET_ERR 2048
If you have a positive reading, decrace the value.
If you have a negative reading, incrace the value.

TIP:
First program the device with the value 2048.
If you get a reading of 0.34 then subtract 34 from 2048
and reprogram the device.

NOTE:
The accurancy of the voltmeter is dependent on the 3.3 volts
regulator. If you have more than one STM32F103C8T6 then choose
the one closest to 3.3V.

Digital oscilloscope:
---------------------
Short the inputs.
If the wave line is not in the middle the offset must be corrected.

If the OP amp amd PWM has no error
#define SCP_OFFSET_ERR 0
If the line is above middle, decrace the value.
If the line is below middle, incrace the value.

Overshot / undershot adjustment.
Select CAL.
Connect the probe to DDS wave out (PC13).
Adjust the 40pF variable capacitor until you cet a flat top.

              |\_____
Overshot      |
              |

                _____
              /
Undershot    /
              |

              ______
              |
OK            |
              |


LC Meter:
---------
Leave inputs unconnected.
Select Calibrate and change LCM_F1 and LCM_F2.
#define LCM_F1 494572
#define LCM_F2 352336

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 03, 2022, 10:37:21 PM
New upload.

https://sourceforge.net/projects/radasm30/files/RadSTM32/Projects/LCMScopeWaveDVM.zip/download (https://sourceforge.net/projects/radasm30/files/RadSTM32/Projects/LCMScopeWaveDVM.zip/download)

Bugfixes and improvements v1.1:
-------------------------------
Logic analyser.
Added bit values and time offset.

Wave generator.
50Hz to 50KHz in 1, 2, 5 steps.

Digital Oscilloscope.
Fixed bugs on ranges 5us / div to 10ns / div.


KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 07, 2022, 08:18:26 PM
Anoying ini fil bug in STM32_F401.ini, STM32_F407.ini and STM32_F411.ini

Change:

[CodeBlock]
Cmnt=/*,*/
0={,},,,0
1=/*,*/,,,32

to:

[CodeBlock]
Cmnt=/*,*/
0=/*,*/,,,32

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 10, 2022, 01:58:00 AM
Some time ago I bouth a 4.0 inch LCD panel on eBay.
The panel has the ST7796 driver chip.
More info at: http://www.lcdwiki.com/4.0inch_SPI_Module_ST7796 (http://www.lcdwiki.com/4.0inch_SPI_Module_ST7796)

I finally found the time to test it.
Included is the source code and how to connect it to the STM32F103C8T6 (Blue Pill) .
An image is also included.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 11, 2022, 07:28:52 PM
Same as abow but for the STM32F401 (Black Pill).
It shouldl also work with the STM32F411 (Black Pill).

I will for shure create somthing useful with this MCU / LCD.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 15, 2022, 07:56:34 AM
Educational experiments tool version 2.
-----------------------------
What you need:
Breadboard and wire jumpers
STM32F401 and ST-Link programmer
4.0 inch SPI LCD panel  with ST7796 controller
Capacitors:
1 x 47uF electrolye
2 x 10nF
1 x 1nF
1 x 330pF
Resistors:
1 x 68K
1 x 33K
1 x 22K
2 x 18K
4 x 10K

What you can build:
-------------------
Digital oscilloscope
Waveform generator
High speed clock generator
Frequency counter
Voltmeter
Ohm-meter (measure resistors)
Capistance-meter (measure capacitors)
Inductance meter (measure inductors)
Diode tester
Transistor tester, auto detect NPN / PNP
+ your own inventions

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 20, 2022, 07:52:22 PM
Abowe post has been updated to version 2.

New experiments to try:

Inductance meter (measure inductors)
Diode tester
Transistor tester, auto detect NPN / PNP


KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 27, 2022, 08:26:54 PM
SimCadAddin bugfix.

Unzip SimCadAddin.zip to C:\RadSTM32\Addins

Version 1.0
-----------
Initial release.
Version 1.1
-----------
o Fixed bug where adding a symbol did not work as it should.
o It is now possible to have more than one cad file open.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: Raistlin on October 28, 2022, 08:22:09 AM
VERY VERY Cool KetilO, this project is awesome  :thumbsup:
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on January 17, 2023, 01:06:00 AM
Educational experiments tool version 3.

Version 3      2023-01-16 Bugfix
                    Fixed bug in LCD.c LCD_WR_REG where
                  the program could hang in this function.
                  Speed optimized LCD.c LCD_DrawIcon.
                  Changed main.c SysTick handler to generate
                  interrupt every second.

The above posts download and Sourceforge  has been updated.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: bluedevil on January 24, 2023, 12:19:22 AM
Hello Ketil;
Does the driver IC matters while using 4.0" lcd screen? For example can I use ILI9486 with your sources?
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: bluedevil on January 24, 2023, 01:07:22 AM
How much volts you need for reed relays: 5V, 12V or 24V
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on January 26, 2023, 12:59:08 AM
Hi

"Does the driver IC matters while using 4.0" lcd screen? For example can I use ILI9486 with your sources?"
No, the LCD.c file needs to be modified to match the  ILI9486 .

"How much volts you need for reed relays: 5V, 12V or 24V"
5V

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on January 26, 2023, 01:34:18 AM
Hi,

I am currently working on a project using the STM32F103 (blue pill) where you connect
it to yor PC via USB. The PC will then replace the LCD screen.

Included are all the sources for this early version.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: zedd151 on January 26, 2023, 04:16:07 AM
Quote from: KetilO on January 26, 2023, 01:34:18 AM...
I am currently working on a project using the STM32F103 (blue pill) where you connect
it to yor PC via USB. The PC will then replace the LCD screen...

Sounds like an outstanding project. Makes me want to get back into making electronics projects of my own again...  :biggrin:
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: bluedevil on January 26, 2023, 05:09:04 AM
Ketil; thank you for your answers.

I have questions on the semi-conductors: TLE2072, TL074, TL712 and LM311. You have mentioned the base names but did not share the exact names. There are several postfixes for those transistors; like: TLE2072ACP, TLE2072IP, TLE2072CP and goes on...

I have found these on Al-i-express; are those compatible?

TL074CN (https://www.aliexpress.com/item/32556389326.html)
LM311DR (https://www.aliexpress.com/item/32459171624.html)
TLE2072CP (https://www.aliexpress.com/item/1005003288898245.html)
TL712CP (https://www.aliexpress.com/item/1005003755563816.html)

Or can you share the full names(including postfixes) of transistors. Thank you.
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on January 26, 2023, 07:36:41 PM
Hi bluedevil

The only important thing is that it is a PDIP package and not the SOIC.
Some postfixes are for ceramic or plastic and lead free

Example:
TLE2072CP (PDIP-8) - OK
LE2072ACPE4 (PDIP-8 lead free) - OK
TLE2072IDR (SOIC 8)- Surface mount, not ok

KetilO



Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: bluedevil on January 27, 2023, 04:17:06 AM
OK Ketil, taking into account your directions, I am goıng to buy those semiconductors:

TL074CN (https://www.aliexpress.com/item/32556389326.html)
LM311P (https://www.aliexpress.com/item/1005003529920273.html)
TLE2072CP (https://www.aliexpress.com/item/1005003288898245.html)
TL712CP (https://www.aliexpress.com/item/1005003755563816.html)

I understand that these are compatible for your projects.
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on January 28, 2023, 12:07:00 AM
Hi bluedevil
I hav checked these on Mouser.

TL074CN - OK
LM311P - OK
TLE2072CP - OK
TL712CP  - OK

NOTE!
I trided to order some TLE2072 from China once.
They were all fakes and did not even come close to the specs for TL072.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: zedd151 on January 28, 2023, 03:10:51 AM
Quote from: KetilO on January 28, 2023, 12:07:00 AM
NOTE!
I trided to order some TLE2072 from China once.
They were all fakes and did not even come close to the specs for TL072.
I can attest to this, especially when ordering electronic components from aliexpress. They have independent sellers there and a lot of fakes. Be especially wary if a deal seems to good to be true. It usually is.
That being said, there are legit bargains that can be had there as well (aliexpress). NOTE: some sellers sell used parts but do not say they have been desoldered. So, from my experience aliexpress is a mixed bag. Buyer beware... unsure of other Chinese vendors myself. Pretty sure ordering from amazon will yield similar results as with aliexpress as far as quality or lack thereof.
BTW don't buy resistors there at aliexpress. Cheaply made and very thin leads. Tolerances are ok, but .... cannot be used in solderless beadboards for prototyping. Leads are just too thin.

Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: bluedevil on January 30, 2023, 02:38:38 AM
@KetiLO and @zedd151
Thank you for replies. I understand that mouser is more reliable? I have bought some arduino and arduino components before and they were all good btw.
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: zedd151 on January 30, 2023, 03:09:39 AM
Quote from: bluedevil on January 30, 2023, 02:38:38 AM
@KetiLO and @zedd151
Thank you for replies. I understand that mouser is more reliable? I have bought some arduino and arduino components before and they were all good btw.
Mouser and other companies specifically selling electronic components should be fine, imo. Buying from oversees has been a mixed bag (some good, some bad) for me. Of course Mouser et. al., would be more expensive but would have some semblance of quality to what they are selling as opposed to aliexpress.
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on February 05, 2023, 08:08:00 AM
USB PC Scoope
-----------------
What you need to do this experiment:
------------------------------------------
PC and USB cable
Breadboard and wire jumpers
STM32F103C8T6 (blue pill) and ST-Link programmer
Resistors and capacitors (see below).

What you can build:
----------------------
Digital oscilloscope
  2 x 18K resistor
  1 x 27K resistor
  1 x 47uF electrolye

1KHz waveform generator
  1 x 10K resistor
  1 x 4.7nF capacitor

High speed clock generator
  1 x 1K resistor

Digital multimeter
  o Voltmeter AC (20V) and DC (30V)
    1 x 68K resistor
    1 x 22K resistor
    1 x 10K resistor
  o Inductance meter
    2 x 180K resistor
    1 x 470Ohn resistor
    1 x 10uF electrolye
    1 x 1nF capacitor
  o Ohm meter
  o Capacitance meter
  o Continuity tester
  o Diode tester
  o Transistor tester
    2 x 10K resistor
    1 x 10nF capacitor

Inductor:
(https://i.postimg.cc/VrqJ6zVX/Inductor-PC.jpg) (https://postimg.cc/VrqJ6zVX)
(https://i.postimg.cc/CzLRhTHf/Inductor-STM.jpg) (https://postimg.cc/CzLRhTHf)
Scpe:
(https://i.postimg.cc/xqPkVTH2/Scope-PC.jpg) (https://postimg.cc/xqPkVTH2)
(https://i.postimg.cc/kB1BD1fY/Scope-STM.jpg) (https://postimg.cc/kB1BD1fY)


Included are all the sources and drawings.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: step8 on April 28, 2023, 01:07:14 PM
@KetilO
Thanks for your sharing. Good work :thumbsup: :thumbsup:
I find your STMSpy.exe use STLinkUSBDriver.dll,do you have the document for how to use this dll?
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on May 11, 2023, 10:54:04 PM
Hi,

STLinkUSBDriver.dll is made by ST. I hav not been able to find any documentation.
Many years ago someone made a port to Linux and from that I was able to make STLink.lib.

Included is the sources for STLink.lib
Maybe it can be of some use to you.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on May 11, 2023, 11:08:14 PM
Hi,

This is the latest sources for STM32Spy.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: step8 on May 14, 2023, 08:09:08 PM
 :thumbsup:
Thanks very much.
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on October 06, 2023, 08:06:04 PM
Updated SimCad addin.

Version 1.2 (10/06/2023)
------------------------
o Fixed bug where printing top layer PCB was not mirrored.
o Fixed bugs where changes did not trigger file changed.

Ger it here:
https://sourceforge.net/projects/radasm30/files/RadSTM32/SimCadAddin.zip/download (https://sourceforge.net/projects/radasm30/files/RadSTM32/SimCadAddin.zip/download)

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on December 03, 2023, 09:50:16 PM
USB_MultiTool

DownLoad:
https://sourceforge.net/projects/radasm30/files/RadSTM32/Projects/USB_MultiTool/USB_MultiTool.zip/download (https://sourceforge.net/projects/radasm30/files/RadSTM32/Projects/USB_MultiTool/USB_MultiTool.zip/download)

USB Multi Tool
--------------
This tool is very cheap, yet has many useful featurees.
It has been kept cheap by avoiding switches and relays
and by using your PC / Laptop as the screen and power supply.
Different sub functions are selected by inserting the probe in
left or right position (LC meter and DMM).

o Digital Osilloscope
  o Input
    - 1 MOhm
    - AC / DC / GND
    - 50mV to 2V / Div
    - 10MHz at -3db, without probe and 3.3Vpp sqear wave
    - Max 15MHz, without probe and 3.3Vpp sqear wave
    - Max 12MHz, with DIY X1 probe and 3.3Vpp sqear wave
  o Timebase
    - 25ns to 500ms / Div
    - Sliding wave mode on 250ms and 500ms / div.
    - Normal mode on 5us to 100ms / div.
      In this mode single shot can be used.
    - Fast mode on 25ns to 2.5us / div.
      Minimum input frequency 50KHz.
      36 MHz worst case sample rate.
      400 MHz best case sample rate.
      When using the HS Clock as signal sorce, worst
      case is always true.
  o Trigger
    - Pre trigger
    - Rising edge
    - Falling edge
    - None
    - Sensivity 35mV
  o Position
    - Horisontal
    - Vertical +/- 8.0V
    - Trigger +/- 8.0V
  o Single shot on normal mode
    - 5K sample buffer.
  o Hold
    - Freezes the wave
  o Auto
    - Configures scope to best fit the
      input signal.
  o Save 1 and Save 2
    - Two save slots. Can in many cases be used as a
      substitute for a multi trace scope when you need
      to compare waveforms.
  o Frequency, period and curve quality.
o Logic Analyser
  - Channels: 4 bits
  - Trigger: High, Low or don't care on each bit.
  - Sample size: 64, 128, 256, 512, 1K, 2K, 4K and 8K.
  - Sample rate: 1Hz, 10Hz, 100Hz, 1KHz, 10KHz,
    100KHz, 1MHz, 2MHz and 4MHz
  - Search next or previous trigger
o Waveform generator
  - Off, Sine, Triangle, Squear, Sawtooth, Reverse Sawtooth and DC out
  - 500Hz to 10KHz in 1, 2, 5 steps
  - First and second harmonics
  - 0V to 3Vpp output
    Note:
    The blocking of the 1MHz PWM signal is not perfect.
    If this is a problem, connect a 4n7 capacitor at the probe
    output. This will improve blocking but decrase amplitude.
o High speed squear wave generator
  - 3.3Vpp output
  - 1Hz to 24MHz frequency
  - Resolution: Any frequency that can be
    obtained by dividing 72MHz clock
  - Dutycycle: 0% to 100% in 1% steps
o DDS squear wave generator with sweep
  - 3.3Vpp output
  - 1 Hz to 999999 Hz
  - Resolution: 1 Hz
  - Sweep: 1% to 50% in 1, 2, 5 steps
  - Sweep time: 1s to 50s  in 1, 2, 5 steps
  - Sample rate 7-2 MHz
  NOTE:
  Done in software. Stops when you leave the function.
o Digital voltmeter DC and AC RMS
  o X1 probe:
    - 1 MOhm
    - +/-8V DC
    - 11V AC RMS
  o X10 probe:
    - 10 MOhm
    - +/-80V DC
    - 110V AC RMS
o Ohm Meter
  - 1 Ohm to 1 MOhm
o Capacitance Meter (Electrolytic Capasitors)
  - 10nF to 10 000uF
o Amperemeter DC
  - 1mA to 500mA
o Continuity Tester
  - Blinking svreen
o Diode Tester
o Transistor Tester
  - Auto detect NPN / PNP
  - Ic
  - hFE
  - Vce On
  - Vce Off
o LC Meter (Capacitance and Inductance)
  - Capacitance: pf, nF and uF. Max 1uF
  - Inductance: nH, uH and mH. Max ?
o Stop Watch
  - 100 Hours
  - 100 mS
o Timer
  - 100 Hours
  - 1 Second
o Clock
  - Test the accurancy of LSE and HSE crystals

What you need to build this USB Multi Tool:
-------------------------------------------
Latest version of RadSTM32
PC / Laptop and USB cable

The parts list is split into functions so
you can build only the functions useful to you.

Stop Watch, Timer and Clock
---------------------------
1 x Double sided 12cm by 10cm pcb
1 x STM32F103C8T6 (blue pill) and ST-Link dongle
2 x 20pin female connector
2 x 220uF Electrolytic capacitor
1 x 47uF Tantal capacitor

Digital Osilloscope and DVM
---------------------------
* 1 x 3pin male connector
  1 x TLE2072 Dual OP Amp IC
  1 x TL712 Comparator IC
  1 x B0505 1W Voltage Converter
  1 x SIP-1A05 Reed relay
  1 x 1N4148 Diose
  4 x 10 Ohm Resistor
  2 x 56 Ohm Resistor
  3 x 100 Ohm Resistor
  2 x 330 Ohm Resistor
  1 x 470 Ohm Resistor
  1 x 3K3 Resistor
  1 x 4K7 Resistor
  3 x 100K Resistor
  1 x 330K Resistor
  1 x 470K Resistor
  1 x 40pf Trimmer Capacitor
  1 x 68pF Ceramic Capacitor
  1 x 1uF Metal film Capacitor
  4 x 47uF Tantal Capacitor
  2 x 470uF Electrolytic Capacitor

* Omit this part if you want to use a BNC
  connector and a X1 / X10 scope probe (recomended).

* DIY X1 Scope / DVM probe
  1 x 3pin female connector
  1 x 330 Ohm resistor
  1 x Pen, used as probe housing
  1 x 2mm wire, used as probe tip
  1 x Alligator Clip and ground wire
  1 x 120cm coax cable
  1 x Epoxy glue

* DIY X10 Scope / DVM probe
  1 x 3pin female connector
  1 x 2M2 resistor
  1 x 6M8 resistor
  1 x 10pF to 33pF ceramic capacitor
      value depends on cox capacitance
      (approximately 10% of coax capacitance)
  1 x Pen, used as probe housing
  1 x 2mm wire, used as probe tip
  1 x Alligator Clip and ground wire
  1 x 120cm coax cable
  1 x Epoxy glue

Logic Analyser
--------------
  1 x 10pin male connector
  4 x 1K Resistor

Waveform Generators
-------------------
  1 x 3pin male connector
  1 x 5K6 Resistor
  1 x 4n7 Ceramic Capacitor

Multimeter
----------
  1 x 4pin male connector
  1 x 1A Fuse
  1 x 2N3906 Transistor
  3 x 1N4007 Diode
  2 x 3.3 Ohm Resistor
  1 x 3K3 Resistor
  3 x 10K Resistor
  1 x 33K Resistor

Transistor tester
-----------------
  1 x 4pin male connector
  1 x 2K2 Resistor
  1 x 1M Resistor
 
Electrolytic Capacitor Tester
-----------------------------
  1 x 3pin male connector
  1 x 2N3904 Transistor
  3 x 1K Resistor
  1 x 56 Ohm Resistor

LC Meter
--------
  1 x 4pin male connector
  1 x LM311 Comparator IC
  1 x 10 Ohm Resistor
  1 x 4K7 Resistor
  1 x 2K2 Resistor
  1 x 47K Resistor
  3 x 100K Resistor
  2 x 1nF 1% Metal film Capacitor
  2 x 10uF Tantal Capacitor
  1 x 220uF Electrolytic Capacitor
  1 x 82uH Inductor

Installing software
-------------------
Unzip USB_MultiTool.zip to an empty fplder on your computer.
Copy the x86\USB_MultiTool.exe and the x86\USB_MultiTool.ini to a new folder.
Copy the STM32\USB_MultiTool folder to C:\RadSTM32\STM32_F103\Projects.
Open the project with RadSTM32.
Upload the program to the STM32F103C8T6 using ST-Link dongle.
Remove ST-Link dongle and connect the STM32F103C8T6 to your PC with an USB
cable.
Start USB_MultiTool.exe, select the newly created COM port and push Connect button.
If you get a connection then you have found the correct COM port and successfully
installed the programs.

Creating the PCB
----------------
The process I am using is not easy. There are better
ways to make a PCB. Search the internet for
toner transfer method.

I am using:
  HP Laserjet Professional P1102 printer.
  Plain A4 paper.
  Cooking ware with a flat, thick bottom and
  heating it to around 100C on the stowe.

Printout:
  If you are using different printer / paper size
  then adjust the size of the outer thin frame
  on both the top and bottom PCB designs. You
  must have exactly 2.54mm (0.1 inch) pitch.
  The printout is landscape.

Preparations:
  Cut the PCB to 10cm x 12cm.
  I am doing the top PCB side first.
  Clean the PCB, avoid touching the copper after cleaning.
  Make a hole with a pin in the paper printout,
  upper left and bottom right corners.
  Wrap the printout around the PCB and secure it with masking tape.
  Drill hples where you made the holes in the paper.
  You need these holes when you align the PCB top and bottom.

Toner transfer:
  Place the PCB on a pice of cloth, paper side up.
  Heat up the cooking ware. Place it on the PCB and apply as much
  presure as you can. Wriggle it around and pay extra attention
  to the PCB edges.

Removig the paper:
  Soak the PCB in warm water for a few minutes.
  Remove the paper by rubbing the PCB with your thumb.
  If the transfer was successful you dont need to be
  careful. Inspect and make shure you got rid of all the paper.
  Minor errors can be fixed with a permanent ink pen.

Etching:
  Cover the bottom side with packing tape and etch the PCB.

Repeat the process with the bottom PCB side.
There is a + sign on the PCB to help you with the orientation.

Drilling the hples:
  I am using a home made hand held drill with a motor from
  an old worn out electric toothbrush. The drill bit is 0.6mm.

Soldering:
  Use a fine tiped soldering iron and thin (<=1mm) soldering tin.
  A combination of surface mount and throug hole is used.
  Some componens should be soldered on both sides, others on the
  bottom or top only. When a componet needs to be soldered on both
  sides, but cannot be soldered on the top, then use a single strand
  from a multi stranded wire and solder the wire on the top before
  inserting and soldering the component. Example of ths is the 20 pin
  female heders, reed relay, B0505 1W converter and 470uF capacitors.

Scope overshot / undershot adjustment:
  Select the HS Clock tab.
  Set the the HS Clock to 1KHz and 50% duty cycle (default).
  Connect a jumper wire from HS Clock pin 3 to scope pin 3.
  Select the Scope tab and set sensivity to 500mV / div and timebase
  to 100us / div. Adjust 40pF trimmer until you get a flat response.

Software adjustments:
  Scope vertical position (VPOS):
    Connect a jumper wire from scope pin 1 to scope pin 3 to block noise.
    Select the Scope tab and set sensivity to 50mV / div
    Select the Connect tab and change the VPOS setting until the wave is in
    the middle of the scope screen.
  Scope trigger position (TPOS):
    Select the HS Clock tab.
    Set the the HS Clock to 1KHz and 50% duty cycle (default).
    Connect a jumper wire from HS Clock pin 3 to scope pin 3.
    Select the Scope tab and set sensivity to 500mV / div and timebase
    to 100us / div.
    Select the Connect tab and change the TPOS setting until the trigger
    is lost equaly spaced from wave top and wave bottom..
  Digital voltmeter:
    Connect a jumper wire from scope pin 1 to scope pin 3 to block noise.
    Select the Connect tab and change the DVM setting until it reads 0.00Vdc.
  Digital multimeter:
    Connect the probe in the DMM left position.
    Select the Connect tab and the Calibrate DMM.
    Follow the instructions.
  LC Meter:
    Connect the probe in the LCM right position.
    Select the Connect tab and the Calibrate LCM.
    Wait a few seconds before pushing Next.
 
Some links:
  https://hackaday.com/2016/09/12/take-your-pcbs-from-good-to-great-toner-transfer/ (https://hackaday.com/2016/09/12/take-your-pcbs-from-good-to-great-toner-transfer/)
  https://www.youtube.com/watch?v=cVhSCEPINpM (https://www.youtube.com/watch?v=cVhSCEPINpM)
  https://www.youtube.com/watch?v=rMJM_nwUZAI (https://www.youtube.com/watch?v=rMJM_nwUZAI)

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: NoCforMe on December 04, 2023, 09:34:02 AM

This project piques my curiosity, but what puts me off is 1) the requirement that I use RadAsm (not going to install a whole 'nother IDE just to compile a project--just give me an .exe, library, whatever), and 2) the apparent lack of any schematics for the electronics part of it. Any electronics project MUST have a schematic, and not just a bunch of random instructions ("put R1 between C1 and U1, solder a blue wire to the bottom of R1 ...". No. Give me a standard schematic. I can wire up a board from that no problem.

It'd be really nice to have a DIY digital 'scope ...
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on December 04, 2023, 09:34:21 PM
Hi NoCforMe

Thanks for your interest in this project.

If you dount want to install RadSTM32 but want to see the scematics
then you can download SimCad.exe and USB_MultiTool_PCB.cad file.

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: NoCforMe on December 05, 2023, 08:54:42 AM
Thanks, that's everything needed to build the project.
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on December 06, 2023, 01:05:23 AM
Update to USB_MultiTool

2023-12-03 Version 1.0.0.0
  o Initial release
2023-12-05 Version 1.0.0.1
  o Fixed bug where COM ports > 9 failed to connect
  o Fixed bug where saved scope waves would be displayed
    on Wave Generator, HS Clock and DDS Wave tabs

KetilO
Title: Re: RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)
Post by: KetilO on December 06, 2023, 11:41:11 PM

Image shhows 1MHz squear wave using the DIY X1 probe.
Green wave: Rising edge
Red wave. Falling edge
(https://i.postimg.cc/KkfLdkwZ/USB-Multi-Tool.jpg) (https://postimg.cc/KkfLdkwZ)

KetilO