Example program provided by Embedded Systems Academy, Copyright 2000 Visit www.esacademy.com/faq/progs for more examples This example: R591LIB - name of application: app01.c ==================================================== Small I/O and CAN library for Phytec Rapid Development Kit (RDK) for Philips 8xC591 Hardware requirements ===================== Phytec RDK 591 with Philips 591 Software requirements ===================== Phytec Flash Tools (part of RDK 591) www.phytec.com Raisonance 8051 compiler system - EVAL version sufficient www.americanraisonance.com Keil 8051 compiler system - EVAL version sufficient www.keil.com Optional: Development Assistant-C by RistanCASE www.ristancase.ch Tested using ============ Raisonance 51 Toolset version 6.1.1 Keil C51 Toolset version 6.00 Application description ============================================= Raisonance specific files have their names prefixed with 'r'. Keil specific files have their names prefixed with 'k'. The same source files are used for both compilers. DETAILS: o Set CAN bus for 125kBit, receive all messages with priority < 0x100 o Toggle LED with each incoming CAN message of priority < 0x100 o Use lower 4 bits of dip switches to set a receive filter on all messages with ID = 0x400 + (4-bit awitch value) o Use higher 4 bits of dip switches to set the transmit ID of messages send: ID = 0x400 + (4-bit awitch value) o Transmit poti value in byte 1 of CAN transmit message o Display received analog value on LED D1