iccavr_source

Directory: ARM-PowerPC-ColdFire-MIPS
Plat: C/C++
Size: 2KB
Downloads: 3
Upload time: 2011-06-14 00:24:46
Uploader: 凌峰
Description:   M8 TLC2543 PB5-DATADIN PB0-DATAOUT PB1-# CS PB2-CLOCK// This program does not use tlc2543 the EOC (end of conversion flag) signal, chip select has been in a select, you can also add their own chip-select signal unsigned int tlc2543 (unsigned char senddata) {unsigned int recdata = 0 unsigned int i = 0 senddata = 0B11010000 // control word recdata = 0 // receive the results of the data conversion// PORTB & = 0B11111101 // Chip Enable ( optional) NOP () NOP () for (i = 0 i < 12 i++) {if (senddata & 0x80) PORTB | = 0B00100000 else PORTB & = 0B11011111 // ready to send control words senddata < < = 1 if (PINB & 0x01) recdata | = 0x0001 else recdata & = 0xfffe recdata < < = 1 // Receive the last conversion result

File list:
iccavr_source
.............\ICCAVR源程序.txt,3401,2004-11-28
.............\修正版本.txt,899,2004-12-05

Download users:

Relate files:

Comment: Add Comment

Favorite users: