📄 readme.txt
字号:
/**********************************************************************
* Phase Control
*
* Michael Pearce 26 March 2001
*
* Electronics Workshop, Chemistry Department, University of Canterbury
***********************************************************************
Processors Used: PIC12C508
***********************************************************************
Disclaimer:
The following code has been released so that someone may possibly find
something useful in them. The Author and the company he works for takes
no responsibilty for the use of this code or any damage that may be
caused by using part of all of this code.
***********************************************************************
Overview:
One of the projects I did need accurate control of a 2KW heater
element, so I sat down and designed a phase control system using a Philips
based micro-controller.... It used a simple even time slice method.
We needed another phase control system some years later, and I had just
started using PICs and had a 12C508 to play with. With quite a bit of
thought and some help with some math to work out "Even Power" steps for
a sign wave, I sat down and wrote this simple, soft timed program that
controls a single output and is set but 4 input pins.
The input pins are ON, Plus, Minus and OFF. ON sets output to 100%, OFF
sets output to 0% and Plus/Minus select anything in between in 1% steps.
I like this bit of code because it took a bit of thought to get the timing
right so that no matter what program path was taken it was always 39
instruction cycles, to keep the timing correct. But I think I deleted some
of the timing stuff at one stage so it may no longer be 100% correct, but it
still works fine just the same.
I have since written a phase control system using HT-PIC C that has far
higher resolution (0-255) and controls 4 channels and is interrupt driven,
but is not avaliable for release due to its current comercial application.
Here is a list of the files:
SINEWAVE.ASM
P12C508.INC
VERINFO.TXT
************************ SINEWAVE.ASM ********************************
The Assembly Code listing of the program
************************* P12C508.INC ********************************
The include file needed to use the PIC12C508
************************* VERINFO.TXT ********************************
Some information about the different versions.
********************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -