| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
AP1623 additional file Software module M3L-bus using USART C
Top Searches for this datasheetAP162302.EXE available AP1623 additional file Software module M3L-bus using USART C16x microcontroller family. This software module M3L-bus using Asynchronous/Synchronous serial channel (USART) synchronous mode C16X microcontroller family. M3L-bus used mainly communicate between microcontroller Television application like MegaText, Compact Text. Author: Choon Hock/SCPL Semiconductor Group AP1623 Rel. Software module M3L-bus using USART C16x family Introduction M3L-bus M3L-bus Specifications. Data Transfer Formats. Timing Diagram. Hardware Connection Description Software. Software Concept Description Module Subroutines. Compilation Software. AP1623 ApNote Revision History Actual Revision Rel. Previous Revison: none (Original Version) Page Page actual Rel. prev. Rel. Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Introduction M3L-bus M3L-bus single master protocol which consists 3-wire bus; SCL(clock), SDA(data), I2CEN(for START STOP condition). clock frequency achieve maximum 1.0Mhz that mean faster data transfer rate. microcontrollers from Siemens have dedicated hardware interface specially designed M3L-bus protocol. This software module using dedicated hardware peripheral Asynchronous/Synchronous Serial Interface(USART) C16X microcontroller family. M3L-bus Specification Data Transfer formats When there HIGH transition I2CEN line, indicates START condition. HIGH transition I2CEN defined STOP condition. data line only changed when clock signal line HIGH. Therefore, data line must stable during period clock signal. Each information puts line must 8-bit long. There acknowledge followed every byte sent this M3L-bus protocol. reason implement acknowledge that MegaText comes with input filter lines which will suppress high-frequency interference those lines. M3L-bus mode, data transmitted first. example, chip selected address 1000100 LSB, then data line will 0010001(R/W) MSB. difference from that READ/WRITE position. write select address will 44H, read select address this case C4H. transmitted received data 10110001 LSB, data line will 10001101 MSB. USART peripheral Siemens' microcontroller will sending receiving first. data transmit receive shift registers normal format xxxxxxxx LSB. Therefore, there additional software involved conversion data. There only basic types data transfer format M3L-bus. Figure shows -bus data transfer format writing data from microcontroller/master MegaText/slave. Figure shows data transfer format reading data from MegaText/slave microcontroller/master. Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family I2CEN Start Condition Slave Address Write address Data Data Stop Condition Start Slave Address Write address Data Data Stop Figure M3L-bus data transfer format writing data slave I2CEN Start Condition Slave Address Write address Stop Start Slave Read Address Data Data Stop Condition Start Slave Address Write Addr Stop Start Addr Read Data Data Stop Figure M3L-bus data transfer format reading data from slave Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Timing Diagram clock frequency range 1.0Mhz. clock M3L-bus minimum HIGH period 400ns. Occasionally, MegaText/slave device slow down transmission holding clock line after receiving byte data from microcontroller. This phenomenon defined WAIT condition. Therefore, microcontroller/master needs switch output high impedance read line before transmitting another byte data slave device. Figure shows data transfer timing requirements detail. description abbreviations used shown Table minimum timing requirements needed fulfilled order M3L-bus operate properly. I2CEN tHIGH tLOW tDSL tDWAIT WAIT tRWAIT Wait Condition Figure M3L-bus timing diagram Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Table Abbreviation M3L-bus timing diagram Parameter Symbol Limit Values min. Set-up time I2CEN falling edge Set-up time input falling edge Hold time input from falling edge next rising edge HIGH-time clock LOW-time clock Delay from rising edge until open drain output stage changes impedance Set-up time from I2CEN rising edge Delay from rising edge forced WAIT condition pull-up time WAIT condition load capacitance level output impedance tDSL tDHH typ. max. Unit tHIGH tLOW tDWAIT tRWAIT CSCL Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Hardware Connection Every device connected M3L-bus must have open drain/open collector output both clock(SCL) data(SDA) lines. Each lines connected supply common pull-up resistor 1.0Kohm value. I2CEN line configured push-pull output. connection among master many slave's devices shown figure number devices connected M3L-bus limited only maximum load capacitance 200pF. egaT C16X Figure Hardware connection among master slave devices Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Description Software Software Concept M3L-bus generated Asynchronous/Synchronous Serial Channel(USART) C16X microcontroller. clock frequency M3L-bus with microcontroller. baud rate synchronous operation serial channel determined following formula: BSync fCPU (2+<SOBRS>)*(<SOBG>+1) SOBG fCPU (2+<SOBRS>)* BSync <SOBG> represents content reload register. <SOBRS> represents value SOBRS, this case SOBRS M3L_ASC.C software module divided into software subroutines which accessed main external program. Those software subroutines used construct data transfer format M3L-bus which consists types; writing data slave, reading data from slave. Those software subroutines M3lInit, M3lStart, M3lMasterWrite, M3lMasterRead, M3lStop. types data transfer format written M3L_TEST.C. M3L_TEST.C simple test program which just verify M3L_ASC.C software module. This test program transmit bytes data MegaText from array location microcontroller. bytes data will stored MegaText Next, microcontroller will read back contents bytes from MegaText then store into another array location microcontroller. Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Description Module Subroutines M3L-BUS Software Module Source file: Header file: M3L_ASC.C Description This module standard M3L-bus single master protocol using Asynchronous/Synchronous serial interface. Module Subroutines void CheckClockLine(); void M3lInit(); unsigned char M3lStart(); void M3lMasterWrite(unsigned char input_byte); unsigned char M3lMasterRead(); void M3lStop(); void CheckClockLine() Read line wait condition. will wait until line been released from slave device. Parameter None Description void M3lInit() Initialize port serial communication. P3.7 I2CEN, P3.10 SCLK, P3.11 SDA. Configure asynchronous/synchronous channel synchronous mode baud rate KBaud. Pull-up resistors required lines. Parameter Description None unsigned char M3lStart() Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Generate start condition bus. Before that check clock data line faulty like pull-up resistor SDA/SCL pull-down slave device. time-out faulty approximately before start protocol. Parameter None Description Return return value clock data lines have problem. Otherwise, return value will "1". void M3lMasterWrite(unsigned char input_byte) Output byte data slave device. Parameter unsigned char input_byte Description byte data sent slave. unsigned char M3lMasterRead() Read byte data from slave device. Parameter None Description Return Master device will receive byte data from slave device. void M3lStop() Check WAIT condition before generating STOP condition M3L-bus. Parameter None Description M3L-BUS Application Software Source file: Header file: Semiconductor Group M3L_TEST.C M3L.H AP1623 1.97 Software module M3L-bus using USART C16x family Description This main program transmit bytes data MegaText (SDA 5273) from "raw_data" array. bytes data will stored MegaText device address 5273 (R/W)1000100 LSB. mode, byte transmitted first. sub-address 00001000B. Next, microcontroller will read back contents bytes from store "stored_data" array. Software subroutines unsigned char WriteMegatext(unsigned char sub_addr,unsigned char *buffer,unsigned char num_byte) unsigned char ReadMegatext(unsigned char sub_addr,unsigned char *buffer,unsigned char num_byte) unsigned char WriteMegatext(unsigned char sub_addr,unsigned char *buffer,unsigned char num_byte) Write number data bytes MegaText. flow this subroutine derived from data format writing MegaText figure there faulty, data will written. Parameter unsigned char sub_addr unsigned char *buffer unsigned char num_byte Description specifies sub-address point addressed location number bytes written Return return value clock data lines have problem. Otherwise, return value will "1". unsigned char ReadMegatext(unsigned char sub_addr,unsigned char *buffer,unsigned char num_byte) Read number bytes from MegaText. flow this subroutine derived from data format reading from MegaText figure there faulty, data will read. Semiconductor Group AP1623 1.97 Software module M3L-bus using USART C16x family Parameter unsigned char sub_addr unsigned char *buffer unsigned char num_byte Description specifies sub-address point addressed location number bytes read Return return value clock data lines have problem. Otherwise, return value will "1". Compilation Software compilation this software using KEIL C166 compiler. First all, under PROJECT, clicks "New Project", then name this project files project which M3L_ASC.C M3L_TEST.C. Then, save project. Afterthat, OPTIONS click "C166 Compiler." Lastly, select option under OBJECT cross under "Enable 80C167 instructions". This option will allow C16X derivatives. project really compile link object files. compiling linking project done clicking icon "BUILD ALL". AP162301.EXE compressed file contains M3L.H, M3L_ASC.C, M3L_TEST.C. these files necessary complete compilation software program. Semiconductor Group AP1623 1.97 Other recent searchesRS400 - RS400 RS400 Datasheet PCT388 - PCT388 PCT388 Datasheet FDME1024NZT - FDME1024NZT FDME1024NZT Datasheet CR6002AB - CR6002AB CR6002AB Datasheet CMPTA77 - CMPTA77 CMPTA77 Datasheet 1N4148W - 1N4148W 1N4148W Datasheet 1N4448W - 1N4448W 1N4448W Datasheet 1N914BW - 1N914BW 1N914BW Datasheet
Privacy Policy | Disclaimer |