![HOLT HI-3110 User Manual Download Page 22](http://html1.mh-extra.com/html/holt/hi-3110/hi-3110_user-manual_2146804022.webp)
AN-175
22
Holt Integrated Circuits
LEDs LED1-LED8
The group of eight LEDs (LED1-LED8) are supported by a function in the program since LED1-LED4, LED8
are low true logic whereas LED5-LED7 are high true logic.
Usage: LED_CTL(LED_1,OFF);
// turns off LED1
Usage: LED_CTL(LED_1,ON);
// turns on LED1
TRANSMIT MODE
Select transmit mode from the SW1 dip switches and Press Button-1 after a POR to start transmitting
frames. The transmit function configures the HI-3110 for normal mode at the CAN Bus rate according to
the Bit Rate dip switches. A frame is composed of a predefined header “T8Header[]” and eight bytes for
the data-field. For Mode- 5, Extended Frame Format a different header is used “T8HeaderExt”. The
program concatenates a 32-bit incrementing counter “BigCounter.Word32” to the header data and
loads this into a transmit buffer “TXBuffer” before loading the FIFO with the frame before each
transmission. For debugging purposes there is a special function “getRegStatus()” which will read out
the status registers and load them into an array “DebugArray[]” for viewing if Button-1 is pressed.
The transmit function writes eight frames of data to the FIFO’s then waits for one transmission
completion then waits again until the FIFO becomes empty before attempting to reload the next eight
frames.
RECEIVE MODE
Select receive mode from the SW1 dip switches and the program will go directly into this mode after a
power on reset. The receive mode reads in a frame by first examining the receive FIFO empty bit in the
status register. Received frames are compared with the expected 32-bit counter valued after each
transmission if the OPT1 switch is in the open position. If the 32-bit counter value does not compare the
RED LED8 will be turned on and the program will halt. Close the OPT1 switch to disable pattern checking.
Received frames are stored into a 64 deep array “RXBuffer[64][16]” which provides a convenient way
to view the data in the debugger or by outputting the data on the serial console. When Button-1 is
pressed the program will halt receiving CAN data and print out the last 64 frames of data captured in the
array on the Serial Port. See the example of the print out in the users guide section.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from