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

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

zedd151

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.


bluedevil

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

zedd151

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.

KetilO

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:


Scpe:




Included are all the sources and drawings.

KetilO

step8

#35
@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?

KetilO

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

KetilO

Hi,

This is the latest sources for STM32Spy.

KetilO

step8


KetilO

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

KetilO

KetilO

#40
USB_MultiTool

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://www.youtube.com/watch?v=cVhSCEPINpM
  https://www.youtube.com/watch?v=rMJM_nwUZAI

KetilO

NoCforMe

#41

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

KetilO

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

NoCforMe

Thanks, that's everything needed to build the project.
Assembly language programming should be fun. That's why I do it.

KetilO

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