/* **********tut2.c***************** Simulator tutorial program for the MC68HC11EVB Using the SCI interface to a remote terminal This example accompanies the book "Embedded Microcomputer Systems: Real Time Interfacing", Brooks-Cole, copyright (c) 2000, Jonathan W. Valvano 7/6/99 Interface between the TExaS simulator running a MC68HC11 EVB with ICC11 freeware compiler TExaS Copyright 1999 by Jonathan W. Valvano for more information about ICC11 see http://www.imagecraft.com You may use this file without restrictions */ #include "HC11.h" #include "sci11.h" /* global variables */ char Buffer[10]; /* place for an input string */ char letter; unsigned int n,u; int s; void main(void){ char *pt; unsigned int i; InitSCI(); OutString("Serial Port demo 1/5/99 -JWV"); OutChar(CR); OutUDec(1000); OutChar(SP); OutUDec(0); OutChar(SP); OutUDec(50000U); OutChar(CR); OutSDec(1000); OutChar(SP); OutSDec(0); OutChar(SP); OutSDec(50000U); OutChar(CR); OutUHex(1000); OutChar(SP); OutUHex(0); OutChar(SP); OutUHex(50000U); OutChar(CR); while(1){ OutString("InString: "); InString(Buffer,10); OutChar(SP); OutString(Buffer); OutChar(SP); i=0; while(Buffer[i]){ OutChar(UpCase(Buffer[i])); i++;} OutChar(CR); OutString("InUDec: "); n=InUDec(); OutChar(CR); OutUDec(n); OutChar(CR); OutString("InSDec: "); s=InSDec(); OutChar(CR); OutSDec(s); OutChar(CR); OutString("InUHex: "); u=InUHex(); OutChar(CR); OutUHex(u); OutChar(CR);} } #include "SCI11.C" void resetVectors(void){ /* not really a function, but this must be last */ asm(" org $FFFE"); asm(" FDB __start"); asm(" org $FC00"); /* puts rts in a harmless place */ /* string constants also placed here */ /* the value FC00 means you can have up to 1000 characters of strings */ }