Silicon Laboratories Stepper Machine Instrukcja Użytkownika Strona 24

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 36
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 23
AN155
24 Rev. 1.1
//
// BUFFERED UART FUNCTION PROTOTYPES
//--Top Level - User Functions ------------------------------------------------
// put a string into transmit buffer, used to display text messages
void puts (char *);
// converts a 16 bit number to a string of ASCII characters
// and stores the characaters into the transmit buffer
void putuint(unsigned int);
// converts an 8 bit number to a string of ASCII characters
// and stores the characaters into the transmit buffer
void putuchar(unsigned char);
// retrieves ASCII characters from the receiver buffer
// and converts a string of digits into an 8-bit number
unsigned char getuchar(void);
// retrieves ASCII characters from the receiver buffer
// and converts a string of digits into an 16bit number
unsigned int getuint(void);
void newline(void); // outputs carriage return & line feed
//----------Middle Level - Primitive User Functions ---------------------------
// retrieves one character from the receive buffer using readc and echoes
// the character to the transmit buffer
char getc (void);
// stores one character into the transmit buffer using writec
void putc (char);
void readClear(void); // clears read buffer
void writeClear(void); // clears write buffer
//----------------Lowest level - Hardware access functions --------------------
char readc (void); // pulls one character directly
// from the receive buffer
void writec (char); // writes one character directly
// to the transmit buffer
//-----------------------------------------------------------------------------
// Global VARIABLES
//-----------------------------------------------------------------------------
//
// user interface variables
sbit LED = P0 ^ 6; // bit set high to turn LED on
//
// Stepper Motor Variables
unsigned int Position; // current motor position
unsigned char TableIndex; // index for stepper motor table
unsigned char MaxTableIndex; // maximum index for desired profile
unsigned int SlewCount; // down counter for slewing phase
Przeglądanie stron 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 35 36

Komentarze do niniejszej Instrukcji

Brak uwag