U08232.C - Motorola USB08 Reference Manual

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

U08232.C

//============================================================================
// File: U08232.C
// Func: RS232 Implementation Module for USB08 Demo Application
// Ver.: 1.00
// Auth: (C)2000,2001 by Oliver Thamm, MCT Elektronikladen GbR
//
http://hc08web.de/usb08
// Rem.: View/Edit this File with TAB-Size=4
//============================================================================
//----------------------------------------------------------------------------
#include "hc08jb8.h"
#include "u08232.h"
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Hardware Dependencies - Physical Port Usage for Software SCI Tx/Rx
// Change the following Definitions to meet your Hardware Requirements:
//----------------------------------------------------------------------------
// Transmit Line is PTC[0]
#define setTxLow()
#define setTxHigh() (PTC |= 0x01)
#define enaTxOut()
// Receive Line is PTA[7]
#define tstRxLvl()
#define enaRxIn()
//----------------------------------------------------------------------------
// Hardware Dependencies - SSCI Bit Timing generated by System Timer TIM
// Change the following Definitions to meet your Hardware Requirements:
//----------------------------------------------------------------------------
// clear TSTOP Bit in TSC Register to activate Counter
// PS0..PS2 Prescaler Bits in TSC Register must be 0 (default)
// so the Counter Rate is 3 MHz (0.333µs)
// 9600 Baud -> 104.1666 us per Bit -> 312.5 Clocks per Bit @ 3MHz
// 2400 Baud -> 416.6666 us per Bit -> 1250
// Adjust Value depending on Subroutine Call Overhead
//----------------------------------------------------------------------------
USB08 Evaluation Board
MOTOROLA
(PTC &= ~0x01)
(DDRC |= 0x01)
(PTA & 0x80)
(DDRA &= ~0x80)
Source Code Files
// HC08JB8 Register Definitions
// Header File for RS232 Module
Clocks per Bit @ 3MHz
Source Code Files
Contents
Designer Reference Manual
113

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents