News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

RadASM 3.0.1.0 for STM32F103C8T6 MCU (Blue Pill)

Started by KetilO, August 05, 2022, 06:32:47 PM

Previous topic - Next topic

KetilO

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/

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

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

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

KetilO

KetilO

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

TimoVJL

May the source be with you

bluedevil

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!
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

NoCforMe

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?
Assembly language programming should be fun. That's why I do it.

KetilO

Hi,

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

KetikO

NoCforMe

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.)
Assembly language programming should be fun. That's why I do it.

KetilO

#7
Hi,

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

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

KetilO

NoCforMe

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: ESR meter/transistor tester/LC meter all in one ...
Assembly language programming should be fun. That's why I do it.

KetilO

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


KetilO

#10
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

See more in the first post.

KetilO




KetilO

#11
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

KetilO

#12
I have uploaded my electronics instument project to Sourceforge:

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

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

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

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

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

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

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

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

40pF trimmer capacitor:
-----------------------
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

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


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

KetilO

#13
New upload.

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

KetilO

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