Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Re: M68hc9s12DP256 SCI


Advertise Here

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Re: M68hc9s12DP256 SCI - jmey...@emittechnologies.com - Nov 14 18:43:13 2008

Here is something in C for you:
// accepts ASCII characters from serial port and
// adds them until or max length
// echos input
// accomodates back space
void SCI1_InString(char *string, unsigned short max) {
int length=0;
char character;
character = SCI1_InChar();
while(character!=CR){
if(character==BS){
if(length){
string--;
length--;
SCI1_OutChar(BS);
}
}
else if(length *string++=character;
length++;
SCI1_OutChar(character);
}
character = SCI1_InChar();
}
*string = 0;
}

------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )