V104
Appendix F: Software Glossary
F-3
void portt_wr(char vref)
ve.h
Selects reference voltage for the comparator input port.
Var: vref – {0 ... 15} defines reference as follows
reference = Vth * vref/16.
For vref – 0: reference = Vth.
Vth : Threshold voltage
≈
3.57V
Reference: portt.c
char portt_rd(void)
ve.h
Reads from the 8-bit comparator input port. Returns 8-bit value.
bit = 0, PT
n
< Vref
bit = 1, PT
n
> Vref
where PT
n
is the input voltage and Vref is the selected threshold voltage.
Reference: portt.c
void outport(int portid, int value)
dos.h
Writes 16-bit value to I/O address portid.
Var: portid – I/O address
value – 16 bit value
void outportb(int portid, int value)
dos.h
Writes 8-bit value to I/O address portid.
Var: portid – I/O address
value – 8 bit value
int inport(int portid)
dos.h
Reads from an I/O address portid. Returns 16-bit value.
Var: portid – I/O address
int inportb(int portid)
dos.h
Reads from an I/O address portid. Returns 8-bit value.
Var: portid – I/O address