IOCPbios
Basic Input/Output Software for IOCP-74 I/O Coprocessor
Stock Number: 100-7599DESCRIPTION
The IOCP-74 is supplied with an integrated set of assembly language routines and macros which directly control many of the module's basic core functions. Collectively these routines, or firmware, are called IOCPbios. The routines by themselves do not satisfy any particular application but instead offer a reasonable starting point upon which a user can build and customize the IOCP-74 to meet specific needs. The software is provided in ASCII format, which is easily modified and enhanced by the user. The source code may be combined with other languages such as BASIC or C, or directly complied using MPLAB or the MPASM PIC assembler available from Microchip at no charge. Other brand compilers may also be used.
FEATURES
- PIC assembly language routines eases "Hardware Abstraction" from IOCP-74 and PIC microcontroller
- Fully documented source code is easily modified and customized by user
- Can be merged with other languages including PIC Basic and C
- Compact size uses only 550 words of E(E)PROM and 120 bytes of RAM
DOCUMENTATION
- IOCP-74 Manual (Section #2 details IOCPbios) IOCP74.pdf
- Download IOCPbios: a7599a.zip
- PIC PC/104 Input/Output Coprocessor hpb7585.html
Example Software
This software fragment shows a simple data acquisition application. Each of the three 8-bit analog inputs is measured and their values are placed in the IOCP-74 read array for examination by the host computer. This example illustrates just how easily the IOCP-74 can be applied using functions provided by the IOCPbios.

IOCPbios Function Overview
Note: IOCPbios PIC assembly language routines originally written for Microchip PIC16C74 microcontroller. Some editing and modifications are likely required to integrate with users application software.
Function | Description |
---|---|
Data Acquisition | |
adc_update | Digitizes the voltages appearing at the two 12-bit analog input channels. |
dac_update | Updates the voltages produced by the two 12-bit analog outputs. |
rd_pic_adc | Digitizes the voltage applied to the designated 8-bit PIC analog input channel. |
set_dig_dir | Configures the data direction of the digital I/O channels |
update_dig_io | Performs a write to digital channels configured as outputs and a read of digital channels configured as inputs. |
Mathematical | |
add | Performs addition of two 16-bit numbers |
div | Divides 16-bit dividend by a 16-bit divisor resulting in a 16-bit quotient and 16-bit remainder. |
mul | Performs 16-bit x 16-bit unsigned multiplication producing a 32-bit result |
Non-Volatile Memory | |
rd_eemem | Reads a block of data bytes from non-volatile serial EEPROM. |
wr_eemem | Stores a block of data bytes into non-volatile serial EEPROM. |
SPI (Serial-Peripheral-Interface) | |
spi_select | Activates the designated SPI device |
spi_xfer | Performs a complete SPI transfer using the PIC SSP hardware |
Asynchronous Serial Communications | |
serial_rx | Receives a string of bytes into a buffer using asynchronous serial communications. Performed in background by means of an interrupt driven routine and the PIC USART. |
serial_tx | Transmits a string of bytes from a buffer using asynchronous serial communications. Uses the PIC USART and an interrupt driven routine to perform the transmission in background. |
setbaud | Configures the USART for popular serial communication baud rates. |
Miscellaneous | |
gen_host_irq | Generates a hardware interrupt request to the host computer |
push_w_reg | Pushes the contents of the W register onto the virtual data stack |
pop_w_reg | Loads the W register from the most recent value pushed onto the virtual data stack |