поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

LS7366R датащи(PDF) 16 Page - LSI Computer Systems

номер детали LS7366R
подробное описание детали  32-BIT QUADRATURE COUNTER WITH SERIAL INTERFACE
PDF  17 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  LSI [LSI Computer Systems]
домашняя страница  http://www.lsicsi.com
Logo LSI - LSI Computer Systems

LS7366R датащи(HTML) 16 Page - LSI Computer Systems

Back Button LS7366R_14 Datasheet HTML 9Page - LSI Computer Systems LS7366R_14 Datasheet HTML 10Page - LSI Computer Systems LS7366R_14 Datasheet HTML 11Page - LSI Computer Systems LS7366R_14 Datasheet HTML 12Page - LSI Computer Systems LS7366R_14 Datasheet HTML 13Page - LSI Computer Systems LS7366R_14 Datasheet HTML 14Page - LSI Computer Systems LS7366R_14 Datasheet HTML 15Page - LSI Computer Systems LS7366R_14 Datasheet HTML 16Page - LSI Computer Systems LS7366R_14 Datasheet HTML 17Page - LSI Computer Systems  
Zoom Inzoom in Zoom Outzoom out
 16 / 17 page
background image
#define READ_CNTR 0x60
#define READ_OTR 0x68
#define READ_STR 0x70
#define WRITE_MDR1 0x90
#define WRITE_MDR0 0x88
#define WRITE_DTR 0x98
#define LOAD_CNTR 0xE0
#define LOAD_OTR 0xE4
#define Slave_Select_Low PORTB &= ~(1 << PB4)
#define Slave_Select_High PORTB |= (1 << PB4)
/*Configure and initialize the SPI on PortB of uC*/
void init_spi_master(void)
{
SPCR = (0<<SPE);
// Disable SPI until PortB configuration
/* Port B (DDRB) PB7/SCK, PB5/MOSI, PB4/!SS outputs */
DDRB = (1<<DDB7)|(1<<DDB5)|(1<<DDB4);
// Define Outputs
Slave_Select_High;
// Disable Slave Select
/*** SPCR configuration***
*** CPOL = 0, CPHA = 0, Mode0***
*** DORD = 0, MSB first***
*** MSTR = 1, Master***
***SPE = 1, SPI enabled***
***SCK frequency = fosc/4***/
SPCR = (1<<SPE)|(1<<MSTR);
}
void load_rst_reg(unsigned char op_code)
//dataless write command
{
unsigned char spi_data;
Slave_Select_High;
// Keep SS/ High for LS7366 deselect
Slave_Select_Low;
// Switch SS/ low for new command
SPDR = op_code;
// Send command to LS7366
while (!(SPSR & (1<<SPIF)))
// Wait for end of the transmission
{
};
spi_data = SPDR;
// Reset SPIF
Slave_Select_High;
// Switch SS/ high for end of command
}
void singleByteWrite(unsigned char op_code, unsigned char data) //single byte write command
{
unsigned char spi_data;
Slave_Select_High;
// Keep SS/ High for LS7366 deselect
Slave_Select_Low;
// Switch SS/ low for new command
SPDR = op_code;
// Send command to LS7366
while (!(SPSR & (1<<SPIF)))
// Wait for end of the transmission
{
};
spi_data = SPDR;
// Reset SPIF
SPDR = data;
// Send data to be written to LS7366 register
while (!(SPSR & (1<<SPIF)))
// Wait for end of the transmission
7366R-080511-16



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com