RPi Pico Test Lab and PicoBasic    
                            

Elektronik-Labor  Projekte  Mikrocontroller  PicoBasic         




Paperback: https://www.amazon.de/dp/B0DTYKTPD7
Ebook: https://www.amazon.de/dp/B0DTV5VWW1
Software-Download:  PicoBasic22.zip

German Edition

Foreword

The Rpi Pico TestLab consists of a Raspberry Pi Pico with the appropriate firmware and the corresponding Windows software. It contains measuring devices, plotters and oscilloscopes as well as control over eight digital inputs and outputs, three analog inputs and two PWM outputs for power control or for providing adjustable DC voltages.

In addition, small PicoBasic programs can be used to solve special control or measurement tasks. The tasks range from timers and signal generators to programmable sine wave generators.

BicoBasic is a minimalist and simple programming language. All available commands are visible on the programming interface and can be inserted into a program by clicking on them. Small auxiliary programs for special measurements or for hardware control can be created effortlessly.

The PicoBasic commands are mainly hardware-related and are similar to the basic assembler commands of most processors and microcontrollers. On the one hand, this is useful for the first programming attempts, as the transition to a higher programming language will be easier later on. On the other hand, it can be an interesting challenge to solve complex tasks with the limited resources of PicoBasic.


Cntents

1 Introduction    4
1.1 PicoBasic    5
1.2 The TestLab    8
2 Direct measurements in the TestLab    11
2.1 Oscilloscope functions    11
2.2 Voltage measurement    14
2.3 Circuit test    15
2.4 Measurement of very small currents    18
2.5 Amplifier test    23
3 PicoBasic Start    28
3.1 PicoBasic keywords    28
3.2 User interface    31
3.3 Programs to get started    33
3.4 Program status at startup    37
3.5 Tips and tricks    37
4 Ports, inputs and outputs    39
4.1 Switching outputs    39
4.2 Binary numbers    42
4.3 Hexadecimal numbers    43
4.4 Speed test    47
4.5 Port inputs    50
4.6 Pull-up and pull-down    52
4.7 A timer switch    54
4.8 An RC oscillator    55
5 Calculating with bits and bytes    59
5.1 Serial data transmission    59
5.2 Arithmetic operations    63
5.3 Basic logical functions    65
5.4 Counting loops    68
5.5 Dice    69
6 Analog data processing    71
6.1 Voltage measurement    71
6.2 Series measurement    72
6.3 PWM outputs    74
6.4 Brightness modulation    75
7 Measurement technology    78
7.1 Data recorder    78
7.2 Single-channel oscilloscope    80
7.3 Dual-channel oscilloscope    82
7.4 Arduino oscilloscope    83
7.5 Frequency counter    86
7.6 Rectangle generator    90
7.7 Sine wave generator    92
7.8 Phase shift    94
7.9 Sweep generator    96
8 Sound generation    100
8.1 Adjustable pitch    100
8.2 Alarm siren    101
8.3 Special sounds    102
8.4 Heart rate monitor    104
8.5 Signal delay    106
9 The PicoBasic firmware    109
10 The user program    118


Elektronik-Labor  Projekte  Mikrocontroller  PicoBasic