Code Module #4 - CAN Network Manager

EMICROS - Embedded Micro Software, Last Update: 11/08/08

Introduction
Code Module #3 introduced the interface to the Intel 82527 by reading and writing to the registers. The CAN Network Manager for sending and receiving messages is explained in this code module.
Software
The files needed are;

To compile the files, use the following statements;

set ICC11_LINKER_OPTS=-btext:0xe000 -bdata:0x6000 -dinit_sp:0x7fff -dheap_size:0
icc11 cm4.c candrv.c lcd.c delay.s readcan.s

 

CAN Manager Test
To test this code module with a CANPORT, download the cp11.exe program and execute it under WIN95. This is an object pascal (Delphi) file main.pas that will initialize the CANPORT, send a repeative message, and receive a message from CANTEC11.

Download the cm4.s19 file to CANTEC11 using com11.exe.

 

List of Functions
  • InitCAN Initializes register pointer and resets the Intel 82527
  • qcReset Resets the Intel 82527 board
  • qcReadRegister Read one register on the 82527 (macro)
  • qcWriteRegister Write one register on the 82527
  • UpdateBaudRate Set the baud rate to 1 predefined ‘common’ value
  • qcSetAcceptance Sets the message acceptance filters
  • qcSetupMessage Configures message objects
  • qcCheckMessage Returns the status of a message
  • qcReadMessage Read the message object data bytes
  • qcResetMessage Reset the receive message flag
  • qcSendMessage Sends a message
  • qcOnline Enables CANPORT to send and receive messages
  • qcOffline Removes CANPORT from sending and receiving messages
  • qcWriteMessageData Writes one byte to the message object
  • qcReadMessageData Reads one byte of a message object
  • qcDataReceivedLen Reads the number of bytes received

 



Copyright 1998 Emicros
Last Update: 11/08/08