1 / 4
文档名称:

Digital Benchtop Power Supply - Elektor Jan02.pdf

格式:pdf   页数:4
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Digital Benchtop Power Supply - Elektor Jan02.pdf

上传人:kuo08091 2014/5/17 文件大小:0 KB

下载得到文件列表

Digital Benchtop Power Supply - Elektor Jan02.pdf

文档介绍

文档介绍:POWERSUPPLY
Digital Benchtop
Power Supply (3)
part 3: the software
Design by R. Pagel
The digital benchtop power supply is controlled by a microcontroller
programmed in PIC BASIC, while a Visual BASIC program is responsible
for producing the control panel display on a PC.
Figure 1 shows the flowchart of the program
500 ms display
in the microcontroller. At start-up a brief ini- pause target value
tialisation sequence runs, which resets the start
set values to zero and configures some of the
microcontroller’s pins. The next step, the scan set target
buttons value again
measurement of the actual voltage and cur- initialisation
rent values, already forms part of the main
yes mark
program loop. All the remaining parts of the button 1
button
program follow sequentially in this loop. One measure voltage
no
branch that can occur is when the push-but- and current
tons are being read. The procedure for read- yes mark
button 2 button
ing the buttons is indeed as cumbersome as it format
measured no
(unavoidably) appears from the flowchart. values
The idea is to read each button in turn and, yes mark
button 3
button
when one is found that is pressed, the micro- display
controller stores the corresponding key code. measured no
values
Finally, under `button pressed?’ the micro- yes mark
button 4
controller checks whether any button was in button