5
WS16C48 Pro gram ming Ref er ence
5.1
In tro duc tion
This sec tion pro vides ba sic docu men ta tion for the in cluded I/O rou tines. It is in tended that the ac -
com pa ny ing source code equip the pro gram mer with a ba sic li brary of I/O func tions for the WS16C48
or can serve as the ba sis from which ap pli ca tion spe cific code can be de rived.
5.2
Func tion Defi ni tions
This sec tion briefly de scribes each of the func tions con tained in the driver. Where nec es sary, short
ex am ples will be pro vided to il lus trate us age. Any ap pli ca tion mak ing use of any of the driver func tions
should in clude the header file “uio48.h”, which in cludes the func tion pro to types and the needed con -
stant defi ni tions.
Note that all of the func tions util ize the con cept of “bit_number”. The “bit_number” is a value from
1 to 48 (1 to 24 for in ter rupt re lated func tions) that cor re lates to a spe cific I/O pin. Bit_number 1 is port
0 bit 0 and con tin ues through to bit_number 48 at port 5 bit 7.
INIT_IO - Ini tial ize I/O, set all ports to in put
Syn tax
void init_io(un signed io_ad dress);
De scrip tion
This func tion takes a sin gle ar gu ment:
io_ad dress - The I/O ad dress of the WS16C48 chip.
There is no re turn value. This func tion ini tial izes all I/O pins for in put (sets them high), dis ables all
in ter rupt set tings, and sets the im age val ues.
030923
OPERATIONS MANUAL EBC-BX
Page 5 - 1
Содержание EBC-BX
Страница 2: ...REVISION HISTORY P N 403 0307 000 ECO Number Date Code Rev Level ORIGINATED 030124 B 03 57 030923 C...
Страница 72: ...8 APPENDIX C EBC BX Parts Placement Guide Top 030923 OPERATIONS MANUAL EBC BX Page 8 1...
Страница 73: ...EBC BX Parts Placement Guide Bottom Page 8 2 OPERATIONS MANUAL EBC BX 030923...
Страница 74: ...9 APPENDIX D EBC BX Parts List...
Страница 82: ...10 APPENDIX E EBC BX Mechanical Drawing...
Страница 83: ......
Страница 84: ...11 APPENDIX F WS16C48 I O Routines and Sample Program Listings...