Download: File: X:\USERS\IGOR\DOC\WORD\Atmel\USB to RS232 Application Note\Firmware\USBtoRS232_AT90S2313\AVR Studio 4 project\USB90S2313.asm 26.1.2004

1 ;*************************************************************************** 2 ;* USBSTACKFORTHEAVRFAMILY3;* 4 ;* File Name :"USB90S2313.asm" 5 ;* Title :AVR309:USB to UART protocol converter (simple - small FIFO) 6 ;* Date :26.01.2004 7 ;* Version :2.2 8 ;* Target MCU :AT90S2313-10 9 ;* AUTHOR :Ing. Igor Cesko 10 ;* Slovakia 11 ;* email is hidden 12 ;* http://www.cesko.host.sk 13 ;* 14 ;* DESCRIPTION: 15 ;* USB protocol implementation into MCU with noUSB interface: 16 ;* Device: 17 ;* Universal USB interface (8-bit I/O port + RS232 serial line + EEPROM) 18 ;* + added RS232 FIFO buffer 19 ;*...
Author: Zoble1980 Shared: 8/19/19
Downloads: 1 Views: 3608

Content

1 ;*************************************************************************** 2 ;* USBSTACKFORTHEAVRFAMILY3;* 4 ;* File Name :"USB90S2313.asm" 5 ;* Title :AVR309:USB to UART protocol converter (simple - small FIFO) 6 ;* Date :26.01.2004 7 ;* Version :2.2 8 ;* Target MCU :AT90S2313-10 9 ;* AUTHOR :Ing. Igor Cesko 10 ;* Slovakia 11 ;* email is hidden 12 ;* http://www.cesko.host.sk 13 ;* 14 ;* DESCRIPTION: 15 ;* USB protocol implementation into MCU with noUSB interface: 16 ;* Device: 17 ;* Universal USB interface (8-bit I/O port + RS232 serial line + EEPROM) 18 ;* + added RS232 FIFO buffer 19 ;* 20 ;* The timing is adapted for 12 MHz crystal (overclocked MCU !!!) 21 ;* 22 ;* 23 ;* to add your own functions - see section: TEMPLATE OF YOUR FUNCTION 24 ;* 25 ;* to customize device to your company you must change VendorUSB ID (VID) 26 ;* to VID assigned to your company (for more information see www.usb.org) 27 ;* 28 ;*************************************************************************** 29 .include "2313def.inc" 31 .equ inputport =PINB 32 .equ outputport =PORTB 33 .equ USBdirection =DDRB 34 .equ DATAplus =1 ;signal D+ na PB1 35 .equ DATAminus =0 ;signal D- na PB0 - treba dat na tento pin pull-up 1.5kOhm 36 .equ USBpinmask =0b11111100 ;mask low 2 bits (D+,D-) on PB 37 .equ USBpinmaskDplus =~(1<>8 ;do bitcount CRC polynom - vrchny byte 897 eor temp1,bitcount ;a urob XOR zo zvyskom a CRC polynomom - vrchny byte 898 ldi bitcount,CRC16poly ;do bitcount CRC polynom - spodny byte 899 eor temp0,bitcount ;a urob XOR zo zvyskom a CRC polynomom - spodny byte 900 CRC16NoXOR: 901 dec temp3 ;boli uz vsetky bity v byte 902 brne CRC16LoopByte ;ak nie, tak chod na dalsi bit 903 cp USBBufptrY,ByteCount ;bol uz koniec spravy 904 brne CRC16Loop ;ak nie tak opakuj 905 CRC16End: 906 ret ;inak skonci (v temp0 a temp1 je vysledok) 907 ;- 908 LoadDescriptorFromROM: 909 lpm ;nahraj z pozicie ROM pointra do R0 910 st Y+,R0 ;R0 uloz do buffera a zvys buffer 911 adiw ZH:ZL,1 ;zvys ukazovatel do ROM 912 dec ByteCount ;pokial nie su vsetky byty 913 brne LoadDescriptorFromROM ;tak nahravaj dalej 914 rjmp EndFromRAMROM ;inak skonci Page: 17, 915 ;- 916 LoadDescriptorFromROMZeroInsert: 917 lpm ;nahraj z pozicie ROM pointra do R0 918 st Y+,R0 ;R0 uloz do buffera a zvys buffer 920 bst RAMread,3 ;ak je 3 bit jednotkovy - nebude sa vkladat nula 921 brtc InsertingZero ;inak sa bude vkladat nula 922 adiw ZH:ZL,1 ;zvys ukazovatel do ROM 923 lpm ;nahraj z pozicie ROM pointra do R0 924 st Y+,R0 ;R0 uloz do buffera a zvys buffer 925 clt ;a znuluj 926 bld RAMread,3 ;treti bit v RAMread - aby sa v dalsom vkladali nuly 927 rjmp InsertingZeroEnd ;a pokracuj 928 InsertingZero: 929 clr R0 ;na vkladanie nul 930 st Y+,R0 ;nulu uloz do buffera a zvys buffer 931 InsertingZeroEnd: 932 adiw ZH:ZL,1 ;zvys ukazovatel do ROM 933 subi ByteCount,2 ;pokial nie su vsetky byty 934 brne LoadDescriptorFromROMZeroInsert ;tak nahravaj dalej 935 rjmp EndFromRAMROM ;inak skonci 936 ;- 937 LoadDescriptorFromSRAM: 938 ld R0,Z ;nahraj z pozicie RAM pointra do R0 939 st Y+,R0 ;R0 uloz do buffera a zvys buffer 940 inc ZL ;zvys ukazovatel do RAM 941 dec ByteCount ;pokial nie su vsetky byty 942 brne LoadDescriptorFromSRAM ;tak nahravaj dalej 943 rjmp EndFromRAMROM ;inak skonci 944 ;- 945 LoadDescriptorFromEEPROM: 946 out EEAR,ZL ;nastav adresu EEPROM 947 sbi EECR,EERE ;vycitaj EEPROM do registra EEDR 948 in R0,EEDR ;nahraj z EEDR do R0 949 st Y+,R0 ;R0 uloz do buffera a zvys buffer 950 inc ZL ;zvys ukazovatel do RAM 951 dec ByteCount ;pokial nie su vsetky byty 952 brne LoadDescriptorFromEEPROM;tak nahravaj dalej 953 rjmp EndFromRAMROM ;inak skonci 954 ;- 955 LoadXXXDescriptor: 956 ldi temp0,SOPbyte ;SOP byte 957 sts OutputBufferBegin,temp0 ;na zaciatok vysielacieho buffera dat SOP 958 ldi ByteCount,8 ;8 bytov nahrat 959 ldi USBBufptrY,OutputBufferBegin+2 ;do vysielacieho buffera 961 and RAMread,RAMread ;ci sa bude citat z RAM alebo ROM-ky alebo EEPROM-ky 962 brne FromRAMorEEPROM ;0=ROM,1=RAM,2=EEPROM,4=ROM s vkladanim nuly 963 FromROM: 964 rjmp LoadDescriptorFromROM ;nahrat descriptor z ROM-ky 965 FromRAMorEEPROM: 966 sbrc RAMread,2 ;ak RAMread=4 967 rjmp LoadDescriptorFromROMZeroInsert ;citaj z ROM s vkladanim nuly 968 sbrc RAMread,0 ;ak RAMread=1 Page: 18, 969 rjmp LoadDescriptorFromSRAM ;nahraj data zo SRAM-ky 970 rjmp LoadDescriptorFromEEPROM ;inak citaj z EEPROM 971 EndFromRAMROM: 972 sbrc RAMread,7 ;ak je najvyssi bit v premennej RAMread=1 973 clr RAMread ;znuluj RAMread 974 rcall ToggleDATAPID ;zmenit DATAPID 975 ldi USBBufptrY,OutputBufferBegin+1 ;do vysielacieho buffera - pozicia DATA PID 976 ret 977 ;- 978 PrepareUSBOutAnswer: ;pripravenie odpovede do buffera 979 rcall PrepareUSBAnswer ;pripravenie odpovede do buffera 980 MakeOutBitStuff: 981 inc BitStuffInOut ;vysielaci buffer - vkladanie bitstuff bitov 982 ldi USBBufptrY,OutputBufferBegin ;do vysielacieho buffera 983 rcall BitStuff 984 mov OutputBufferLength,ByteCount ;dlzku odpovede zapamatat pre vysielanie 985 clr BitStuffInOut ;prijimaci buffer - mazanie bitstuff bitov 986 ret 987 ;- 988 PrepareUSBAnswer: ;pripravenie odpovede do buffera 989 clr RAMread ;nulu do RAMread premennej - cita sa z ROM-ky 990 lds temp0,InputBufferBegin+2 ;bmRequestType do temp0 991 lds temp1,InputBufferBegin+3 ;bRequest do temp1 992 cbr temp0,0b10011111 ;ak je5a6bit nulovy 993 brne VendorRequest ;tak to nie je Vendor Request 994 rjmp StandardRequest ;ale je to standardny request 995 ;- 996 DoSetInfraBufferEmpty: 997 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 998 ;- 999 DoSetRS232Baud: 1000 lds temp0,InputBufferBegin+4 ;prvy parameter - hodnota baudrate na RS232 1001 out UBRR,temp0 ;nastav rychlost UART-u 1002 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1003 ;- 1004 DoGetRS232Baud: 1005 in R0,UBRR ;vrat rychlost UART-u v R0 1006 rjmp DoGetIn ;a ukonci 1007 ;- 1008 DoRS232Send: 1009 lds temp0,InputBufferBegin+4 ;prvy parameter - hodnota vysielana na RS232 1010 out UDR,temp0 ;vysli data na UART 1011 WaitForRS232Send: 1012 sbis UCR,TXEN ;ak nie je povoleny UART vysielac 1013 rjmp OneZeroAnswer ;tak skonci - ochrana kvoli zacykleniu v AT90S2323/2343 1014 sbis USR,TXC ;pockat na dovysielanie bytu 1015 rjmp WaitForRS232Send 1016 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1017 ;- 1018 DoRS232Read: 1019 rjmp TwoZeroAnswer ;iba potvrd prijem dvoma nulami 1020 ;- 1021 VendorRequest: 1022 clr ZH ;pre citanie z RAM alebo EEPROM Page: 19, 1024 cpi temp1,1 ; 1025 breq DoSetInfraBufferEmpty ;restartne infra prijimanie (ak bolo zastavene citanim z RAM-ky) 1027 cpi temp1,2 ; 1028 breq DoGetInfraCode ;vysle prijaty infra kod (ak je v bufferi) 1030 cpi temp1,3 ; 1031 breq DoSetDataPortDirection ;nastavi smer toku datovych bitov 1032 cpi temp1,4 ; 1033 breq DoGetDataPortDirection ;zisti smer toku datovych bitov 1035 cpi temp1,5 ; 1036 breq DoSetOutDataPort ;nastavi datove bity (ak su vstupne, tak ich pull-up) 1037 cpi temp1,6 ; 1038 breq DoGetOutDataPort ;zisti nastavenie datovych out bitov (ak su vstupne, tak ich pull-up) 1040 cpi temp1,7 ; 1041 breq DoGetInDataPort ;vrati hodnotu datoveho vstupneho portu 1043 cpi temp1,8 ; 1044 breq DoEEPROMRead ;vrati obsah EEPROM od urcitej adresy 1045 cpi temp1,9 ; 1046 breq DoEEPROMWrite ;zapise EEPROM na urcitu adresu urcite data 1048 cpi temp1,10 ; 1049 breq DoRS232Send ;vysle byte na seriovy linku 1050 cpi temp1,11 ; 1051 breq DoRS232Read ;vrati prijaty byte zo seriovej linky (ak sa nejaky prijal) 1053 cpi temp1,12 ; 1054 breq DoSetRS232Baud ;nastavi prenosovu rychlost seriovej linky 1055 cpi temp1,13 ; 1056 breq DoGetRS232Baud ;vrati prenosovu rychlost seriovej linky 1057 cpi temp1,14 ; 1058 breq DoGetRS232Buffer ;vrati RS232 buffer 1060 cpi temp1,USER_FNC_NUMBER+0 ; 1061 breq DoUserFunction0 ;vykona uzivatelsku rutinu0 1062 cpi temp1,USER_FNC_NUMBER+1 ; 1063 breq DoUserFunction1 ;vykona uzivatelsku rutinu1 1064 cpi temp1,USER_FNC_NUMBER+2 ; 1065 breq DoUserFunction2 ;vykona uzivatelsku rutinu2 1067 rjmp ZeroDATA1Answer ;ak to bolo nieco nezname, tak priprav nulovu odpoved 1069 ;- USER FUNCTIONS - 1071 ;-TEMPLATE OF YOUR FUNCTION- 1072 ;- BEGIN: This is template how to write own function - 1074 ;free of use are registers: 1075 ;temp0,temp1,temp2,temp3,ACC,ZH,ZL 1076 ;registers are destroyed after execution (use push/pop to save content) Page: 20, 1078 ;at the end of routine you must correctly set registers: 1079 ;RAMread - 0=reading from ROM, 1=reading from RAM, 2=reading from EEPROM 1080 ;temp0 - number of transmitted data bytes 1081 ;ZH,ZL - pointer to buffer of transmitted data (pointer to ROM/RAM/EEPROM) 1083 ;to transmit data (preparing data to buffer) : 1084 ;to transmit data you must jump to "ComposeEndXXXDescriptor" 1085 ;to transmit one zero byte you can jump to "OneZeroAnswer" (commonly used as confirmation of correct processing) 1086 ;to transmit two zero byte you can jump to "TwoZeroAnswer" (commonly used as confirmation of error in processing) 1088 DoUserFunctionX: 1089 DoUserFunction0: ;send byte(s) of RAM starting at position given by first parameter in function 1090 lds temp0,InputBufferBegin+4 ;prvy parameter Lo do temp0 1091 ;lds temp1,InputBufferBegin+5 ;prvy parameter Hi do temp1 1092 ;lds temp2,InputBufferBegin+6 ;druhy parameter Lo do temp2 1093 ;lds temp3,InputBufferBegin+7 ;druhy parameter Hi do temp3 1094 ;lds ACC,InputBufferBegin+8 ;pocet pozadovanych bytov do ACC 1096 ;Tu si pridajte vlastny kod: 1097 ;- 1098 nop ;priklad na kod - nic nerobi 1099 nop 1100 nop 1101 nop 1102 nop 1103 ;- 1105 mov ZL,temp0 ;bude sa posielat hodnota RAM adresy ulozena v temp0 (prvy parameter funkcie) 1106 inc RAMread ;RAMread=1 - cita sa z RAM-ky 1107 ldi temp0,RAMEND+1 ;posli max pocet byte - celu RAM 1108 rjmp ComposeEndXXXDescriptor ;a priprav data 1109 DoUserFunction1: 1110 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1111 DoUserFunction2: 1112 rjmp TwoZeroAnswer ;potvrd prijem dvoma nulami 1113 ;- END: This is template how to write own function - 1115 ;- USER FUNCTIONS - 1117 DoGetInfraCode: 1118 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1120 DoEEPROMRead: 1121 lds ZL,InputBufferBegin+4 ;prvy parameter - offset v EEPROM-ke 1122 ldi temp0,2 1123 mov RAMread,temp0 ;RAMread=2 - cita sa z EEPROM-ky 1124 ldi temp0,E2END+1 ;pocet mojich bytovych odpovedi do temp0 - cela dlzka EEPROM 1125 rjmp ComposeEndXXXDescriptor ;inak priprav data 1126 DoEEPROMWrite: 1127 lds ZL,InputBufferBegin+4 ;prvy parameter - offset v EEPROM-ke (adresa) 1128 lds R0,InputBufferBegin+6 ;druhy parameter - data, ktore sa maju zapisat do EEPROM-ky (data) 1129 rjmp EEPROMWrite ;zapis do EEPROM a aj ukonci prikaz 1130 DoSetDataPortDirection: Page: 21, 1131 lds ACC,InputBufferBegin+4 ;prvy parameter - smer datovych bitov 1132 rcall SetDataPortDirection 1133 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1134 DoGetDataPortDirection: 1135 rcall GetDataPortDirection 1136 rjmp DoGetIn 1138 DoSetOutDataPort: 1139 lds ACC,InputBufferBegin+4 ;prvy parameter - hodnota datovych bitov 1140 rcall SetOutDataPort 1141 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1142 DoGetOutDataPort: 1143 rcall GetOutDataPort 1144 rjmp DoGetIn 1146 DoGetInDataPort: 1147 rcall GetInDataPort 1148 DoGetIn: 1149 ldi ZL,0 ;posiela sa hodnota v R0 1150 ldi temp0,0x81 ;RAMread=1 - cita sa z RAM-ky 1151 mov RAMread,temp0 ;(najvyssi bit na 1 - aby sa hned premenna RAMread znulovala) 1152 ldi temp0,1 ;posli iba jeden byte 1153 rjmp ComposeEndXXXDescriptor ;a priprav data 1155 DoGetRS232Buffer: 1156 mov temp0,RS232BufferFull ;zisti dlzku buffera RS232 kodu 1157 cpi temp0,0 ;ak je RS232 Buffer prazdny 1158 breq OneZeroAnswer ;tak nic neposli a potvrd prijem jednou nulou 1160 lds ACC,InputBufferBegin+8 ;pocet pozadovanych bytov do ACC 1161 inc temp0 ;pocet moznych dodanych bajtov (plus byte dlzky buffera) 1162 cp ACC,temp0 ;ak sa neziada viac ako mozem dodat 1163 brcc NoShortGetRS232Buffer ;vysli tolko kolko sa ziada 1164 mov temp0,ACC 1165 NoShortGetRS232Buffer: 1166 dec temp0 ;uber byte dlzky 1167 lds temp1,RS232BufferBegin+1 ;zisti ukazovatel citania buffera RS232 kodu : 2.byte hlavicky (dlzka kodu + citanie + zapis + rezerva) 1168 add temp1,temp0 ;zisti kde je koniec 1169 cpi temp1,RS232BufferBegin+MAXRS232LENGTH+1 ;ak by mal pretiect 1170 brcs ReadNoOverflow 1171 subi temp1,RS232BufferBegin+MAXRS232LENGTH+1 ;vypocitaj kolko sa neprenesie 1172 sub temp0,temp1 ;a o to skrat dlzku citania 1173 ldi temp1,RS232BufferBegin+4 ;a zacni od nuly 1174 ReadNoOverflow: 1175 lds ZL,RS232BufferBegin+1 ;zisti ukazovatel citania buffera RS232 kodu : 2.byte hlavicky (dlzka kodu + citanie + zapis + rezerva) 1176 sts RS232BufferBegin+1,temp1 ;zapis novy ukazovatel citania buffera RS232 kodu : 2.byte hlavicky (dlzka kodu + citanie + zapis + rezerva) 1177 dec ZL ;priestor pre udaj dlky - prenasa sa ako prvy bajt 1179 sub RS232BufferFull,temp0 ;zniz dlzku buffera 1180 st Z,RS232BufferFull ;a uloz skutocnu dlzku do paketu 1181 inc temp0 ;a o tento jeden bajt zvys pocet prenasanych bajtov (dlzka buffera) Page: 22, 1182 inc RAMread ;RAMread=1 - cita sa z RAM-ky 1183 rjmp ComposeEndXXXDescriptor ;a priprav data 1184 ;- END USER FUNCTIONS - 1186 OneZeroAnswer: ;posle jednu nulu 1187 ldi temp0,1 ;pocet mojich bytovych odpovedi do temp0 1188 rjmp ComposeGET_STATUS2 1190 StandardRequest: 1191 cpi temp1,GET_STATUS ; 1192 breq ComposeGET_STATUS ; 1194 cpi temp1,CLEAR_FEATURE ; 1195 breq ComposeCLEAR_FEATURE ; 1197 cpi temp1,SET_FEATURE ; 1198 breq ComposeSET_FEATURE ; 1200 cpi temp1,SET_ADDRESS ;ak sa ma nastavit adresa 1201 breq ComposeSET_ADDRESS ;nastav adresu 1203 cpi temp1,GET_DESCRIPTOR ;ak sa ziada descriptor 1204 breq ComposeGET_DESCRIPTOR ;vygeneruj ho 1206 cpi temp1,SET_DESCRIPTOR ; 1207 breq ComposeSET_DESCRIPTOR ; 1209 cpi temp1,GET_CONFIGURATION ; 1210 breq ComposeGET_CONFIGURATION ; 1212 cpi temp1,SET_CONFIGURATION ; 1213 breq ComposeSET_CONFIGURATION ; 1215 cpi temp1,GET_INTERFACE ; 1216 breq ComposeGET_INTERFACE ; 1218 cpi temp1,SET_INTERFACE ; 1219 breq ComposeSET_INTERFACE ; 1221 cpi temp1,SYNCH_FRAME ; 1222 breq ComposeSYNCH_FRAME ; 1223 ;ak sa nenasla znama poziadavka 1224 rjmp ZeroDATA1Answer ;ak to bolo nieco nezname, tak priprav nulovu odpoved 1226 ComposeSET_ADDRESS: 1227 lds temp1,InputBufferBegin+4 ;nova adresa do temp1 1228 rcall SetMyNewUSBAddresses ;ENG;and compute NRZI and bitstuffing coded adresses 1229 ldi State,AddressChangeState ;nastav stav pre zmenu adresy 1230 rjmp ZeroDATA1Answer ;posli nulovu odpoved 1232 ComposeSET_CONFIGURATION: 1233 lds ConfigByte,InputBufferBegin+4 ;cislo konfiguracie do premennej ConfigByte 1234 ComposeCLEAR_FEATURE: 1235 ComposeSET_FEATURE: Page: 23, 1236 ComposeSET_INTERFACE: 1237 ZeroStringAnswer: 1238 rjmp ZeroDATA1Answer ;posli nulovu odpoved 1239 ComposeGET_STATUS: 1240 TwoZeroAnswer: 1241 ldi temp0,2 ;pocet mojich bytovych odpovedi do temp0 1242 ComposeGET_STATUS2: 1243 ldi ZH, high(StatusAnswer<<1) ;ROMpointer na odpoved 1244 ldi ZL, low(StatusAnswer<<1) 1245 rjmp ComposeEndXXXDescriptor ;a dokonci 1246 ComposeGET_CONFIGURATION: 1247 and ConfigByte,ConfigByte ;ak som nenakonfigurovany 1248 breq OneZeroAnswer ;tak posli jednu nulu - inak posli moju konfiguraciu 1249 ldi temp0,1 ;pocet mojich bytovych odpovedi do temp0 1250 ldi ZH, high(ConfigAnswerMinus1<<1) ;ROMpointer na odpoved 1251 ldi ZL, low(ConfigAnswerMinus1<<1)+1 1252 rjmp ComposeEndXXXDescriptor ;a dokonci 1253 ComposeGET_INTERFACE: 1254 ldi ZH, high(InterfaceAnswer<<1) ;ROMpointer na odpoved 1255 ldi ZL, low(InterfaceAnswer<<1) 1256 ldi temp0,1 ;pocet mojich bytovych odpovedi do temp0 1257 rjmp ComposeEndXXXDescriptor ;a dokonci 1258 ComposeSYNCH_FRAME: 1259 ComposeSET_DESCRIPTOR: 1260 rcall ComposeSTALL 1261 ret 1262 ComposeGET_DESCRIPTOR: 1263 lds temp1,InputBufferBegin+5 ;DescriptorType do temp1 1264 cpi temp1,DEVICE ;DeviceDescriptor 1265 breq ComposeDeviceDescriptor ; 1266 cpi temp1,CONFIGURATION ;ConfigurationDescriptor 1267 breq ComposeConfigDescriptor ; 1268 cpi temp1,STRING ;StringDeviceDescriptor 1269 breq ComposeStringDescriptor ; 1270 ret 1271 ComposeDeviceDescriptor: 1272 ldi ZH, high(DeviceDescriptor<<1) ;ROMpointer na descriptor 1273 ldi ZL, low(DeviceDescriptor<<1) 1274 ldi temp0,0x12 ;pocet mojich bytovych odpovedi do temp0 1275 rjmp ComposeEndXXXDescriptor ;a dokonci 1276 ComposeConfigDescriptor: 1277 ldi ZH, high(ConfigDescriptor<<1) ;ROMpointer na descriptor 1278 ldi ZL, low(ConfigDescriptor<<1) 1279 ldi temp0,9+9+7 ;pocet mojich bytovych odpovedi do temp0 1280 ComposeEndXXXDescriptor: 1281 lds TotalBytesToSend,InputBufferBegin+8 ;pocet pozadovanych bytov do TotalBytesToSend 1282 cp TotalBytesToSend,temp0 ;ak sa neziada viac ako mozem dodat 1283 brcs HostConfigLength ;vysli tolko kolko sa ziada 1284 mov TotalBytesToSend,temp0 ;inak posli pocet mojich odpovedi 1285 HostConfigLength: 1286 mov temp0,TotalBytesToSend ; 1287 clr TransmitPart ;nuluj pocet 8 bytovych odpovedi 1288 andi temp0,0b00000111 ;ak je dlzka delitelna 8-mimi 1289 breq Length8Multiply ;tak nezapocitaj jednu necelu odpoved (pod 8 bytov) Page: 24, 1290 inc TransmitPart ;inak ju zapocitaj 1291 Length8Multiply: 1292 mov temp0,TotalBytesToSend ; 1293 lsr temp0 ;dlzka 8 bytovych odpovedi sa dosiahne 1294 lsr temp0 ;delenie celociselne 8-mimi 1295 lsr temp0 1296 add TransmitPart,temp0 ;a pripocitanim k poslednej necelej 8-mici do premennej TransmitPart 1297 ldi temp0,DATA0PID ;DATA0 PID - v skutocnosti sa stoggluje na DATA1PID v nahrati deskriptora 1298 sts OutputBufferBegin+1,temp0 ;nahraj do vyst buffera 1299 rjmp ComposeNextAnswerPart 1300 ComposeStringDescriptor: 1301 ldi temp1,4+8 ;ak RAMread=4(vkladaj nuly z ROM-koveho citania) + 8(za prvy byte nevkldadaj nulu) 1302 mov RAMread,temp1 1303 lds temp1,InputBufferBegin+4 ;DescriptorIndex do temp1 1304 cpi temp1,0 ;LANGID String 1305 breq ComposeLangIDString ; 1306 cpi temp1,2 ;DevNameString 1307 breq ComposeDevNameString ; 1308 brcc ZeroStringAnswer ;ak je DescriptorIndex vyssi nez 2 - posli nulovu odpoved 1309 ;inak to bude VendorString 1310 ComposeVendorString: 1311 ldi ZH, high(VendorStringDescriptor<<1) ;ROMpointer na descriptor 1312 ldi ZL, low(VendorStringDescriptor<<1) 1313 ldi temp0,(VendorStringDescriptorEnd-VendorStringDescriptor)*4-2 ;pocet mojich bytovych odpovedi do temp0 1314 rjmp ComposeEndXXXDescriptor ;a dokonci 1315 ComposeDevNameString: 1316 ldi ZH, high(DevNameStringDescriptor<<1) ;ROMpointer na descriptor 1317 ldi ZL, low(DevNameStringDescriptor<<1) 1318 ldi temp0,(DevNameStringDescriptorEnd-DevNameStringDescriptor)*4-2 ;pocet mojich bytovych odpovedi do temp0 1319 rjmp ComposeEndXXXDescriptor ;a dokonci 1320 ComposeLangIDString: 1321 clr RAMread 1322 ldi ZH, high(LangIDStringDescriptor<<1) ;ROMpointer na descriptor 1323 ldi ZL, low(LangIDStringDescriptor<<1) 1324 ldi temp0,(LangIDStringDescriptorEnd-LangIDStringDescriptor)*2;pocet mojich bytovych odpovedi do temp0 1325 rjmp ComposeEndXXXDescriptor ;a dokonci 1326 ;- 1327 ZeroDATA1Answer: 1328 rcall ComposeZeroDATA1PIDAnswer 1329 ret 1330 ;- 1331 SetMyNewUSBAddresses: ;nastavi nove USB adresy v NRZI kodovani ;ENG;set new USB addresses in NRZI coded 1332 mov temp2,temp1 ;address to temp2 and temp1 and temp3 1333 mov temp3,temp1 ; 1334 cpi temp1,0b01111111 ;ENG;if address contains less than 6 ones 1335 brne NewAddressNo6ones ;ENG;then don't add bitstuffing 1336 ldi temp1,0b10111111 ;ENG;else insert one zero - bitstuffing 1337 NewAddressNo6ones: 1338 andi temp3,0b00000111 ;ENG;mask 3 low bits of Address 1339 cpi temp3,0b00000111 ;ENG;and if 3 low bits of Address is no all ones 1340 brne NewAddressNo3ones ;ENG;then no change address 1341 ;ENG;else insert zero after 3-rd bit (bitstuffing) 1342 sec ;set carry 1343 rol temp2 ;ENG;rotate left Page: 25, 1344 andi temp2,0b11110111 ;ENG;and inserted zero after 3-rd bit 1345 NewAddressNo3ones: 1346 sts MyOutAddressSRAM,temp2 ;ENG;store new non-coded address Out (temp2) 1347 ;ENG;and now perform NRZI coding 1348 rcall NRZIforAddress ;ENG;NRZI for AddressIn (in temp1) 1349 sts MyInAddressSRAM,ACC ;ENG;store NRZI coded AddressIn 1351 lds temp1,MyOutAddressSRAM ;ENG;load non-coded address Out (in temp1) 1352 rcall NRZIforAddress ;ENG;NRZI for AddressOut 1353 sts MyOutAddressSRAM,ACC ;ENG;store NRZI coded AddressOut 1355 ret ;ENG;and return 1356 ;- 1357 NRZIforAddress: 1358 clr ACC ;vychodzi stav odpovede - mojej nNRZI USB adresy ;ENG;original answer state - of my nNRZI USB address 1359 ldi temp2,0b00000001 ;maska na xorovanie ;ENG;mask for xoring 1360 ldi temp3,8 ;pocitadlo bitov ;ENG;bits counter 1361 SetMyNewUSBAddressesLoop: 1362 mov temp0,ACC ;zapamatat si koncovu odpoved ;ENG;remember final answer 1363 ror temp1 ;do carry vysielany bit LSB (v smere naskor LSB a potom MSB) ;ENG;to carry transmitting bit LSB (in direction firstly LSB then MSB) 1364 brcs NoXORBits ;ak je jedna - nemen stav ;ENG;if one - don't change state 1365 eor temp0,temp2 ;inak sa bude stav menit podla posledneho bitu odpovede ;ENG;otherwise state will be changed according to last bit of answer 1366 NoXORBits: 1367 ror temp0 ;posledny bit zmenenej odpovede do carry ;ENG;last bit of changed answer to carry 1368 rol ACC ;a z carry do koncovej odpovede na miesto LSB (a sucasne prehodenie LSB a MSB poradia) ;ENG;and from carry to final answer to the LSB place (and reverse LSB and MSB order) 1369 dec temp3 ;zmensi pocitadlo bitov ;ENG;decrement bits counter 1370 brne SetMyNewUSBAddressesLoop ;ak pocitadlo bitov nie je nulove opakuj vysielanie s dalsim bitom ;ENG;if bits counter isn't zero repeat transmitting with next bit 1371 ret 1372 ;- 1373 ;- 1374 PrepareOutContinuousBuffer: 1375 rcall PrepareContinuousBuffer 1376 rcall MakeOutBitStuff 1377 ret 1378 ;- 1379 PrepareContinuousBuffer: 1380 mov temp0,TransmitPart 1381 cpi temp0,1 1382 brne NextAnswerInBuffer ;ak uz je buffer prazdny 1383 rcall ComposeZeroAnswer ;priprav nulovu odpoved 1384 ret 1385 NextAnswerInBuffer: 1386 dec TransmitPart ;znizit celkovu dlzku odpovede 1387 ComposeNextAnswerPart: 1388 mov temp1,TotalBytesToSend ;zniz pocet bytov na vyslanie 1389 subi temp1,8 ;ci je este treba poslat viac ako 8 bytov 1390 ldi temp3,8 ;ak ano - posli iba 8 bytov 1391 brcc Nad8Bytov 1392 mov temp3,TotalBytesToSend ;inak posli iba dany pocet bytov 1393 clr TransmitPart Page: 26, 1394 inc TransmitPart ;a bude to posledna odpoved 1395 Nad8Bytov: 1396 mov TotalBytesToSend,temp1 ;znizeny pocet bytov do TotalBytesToSend 1397 rcall LoadXXXDescriptor 1398 ldi ByteCount,2 ;dlzka vystupneho buffera (iba SOP a PID) 1399 add ByteCount,temp3 ;+ pocet bytov 1400 rcall AddCRCOut ;pridanie CRC do buffera 1401 inc ByteCount ;dlzka vystupneho buffera + CRC16 1402 inc ByteCount 1403 ret ;skonci 1404 ;- 1405 .equ USBversion =0x0101 ;pre aku verziu USB je to (1.01) 1406 .equ VendorUSBID =0x03EB ;identifikator dodavatela (Atmel=0x03EB) 1407 .equ DeviceUSBID =0x21FE ;identifikator vyrobku (USB to RS232 converter AT90S2313=0x21FE) 1408 .equ DeviceVersion =0x0002 ;cislo verzie vyrobku (verzia=0.02) 1409 .equ MaxUSBCurrent =46 ;prudovy odber z USB (46mA) 1410 ;- 1411 DeviceDescriptor: 1412 .db 0x12,0x01 ;0 byte - velkost deskriptora v bytoch 1413 ;1 byte - typ deskriptora: Deskriptor zariadenia 1414 .dw USBversion ;2,3 byte - verzia USB LSB (1.00) 1415 .db 0x00,0x00 ;4 byte - trieda zariadenia 1416 ;5 byte - podtrieda zariadenia 1417 .db 0x00,0x08 ;6 byte - kod protokolu 1418 ;7 byte - velkost FIFO v bytoch 1419 .dw VendorUSBID ;8,9 byte - identifikator dodavatela (Cypress=0x04B4) 1420 .dw DeviceUSBID ;10,11 byte - identifikator vyrobku (teplomer=0x0002) 1421 .dw DeviceVersion ;12,13 byte - cislo verzie vyrobku (verzia=0.01) 1422 .db 0x01,0x02 ;14 byte - index stringu "vyrobca" 1423 ;15 byte - index stringu "vyrobok" 1424 .db 0x00,0x01 ;16 byte - index stringu "seriove cislo" 1425 ;17 byte - pocet moznych konfiguracii 1426 DeviceDescriptorEnd: 1427 ;- 1428 ConfigDescriptor: 1429 .db 0x9,0x02 ;dlzka,typ deskriptoru 1430 ConfigDescriptorLength: 1431 .dw 9+9+7 ;celkova dlzka vsetkych deskriptorov 1432 ConfigAnswerMinus1: ;pre poslanie cisla congiguration number (pozor je treba este pricitat 1) 1433 .db 1,1 ;numInterfaces,congiguration number 1434 .db 0,0x80 ;popisny index stringu, atributy;bus powered 1435 .db MaxUSBCurrent/2,0x09 ;prudovy odber, interface descriptor length 1436 .db 0x04,0 ;interface descriptor; cislo interface 1437 InterfaceAnswer: ;pre poslanie cisla alternativneho interface 1438 .db 0,1 ;alternativne nastavenie interface; pocet koncovych bodov okrem EP0 1439 StatusAnswer: ;2 nulove odpovede (na usetrenie miestom) 1440 .db 0,0 ;trieda rozhrania; podtrieda rozhrania 1441 .db 0,0 ;kod protokolu; index popisneho stringu 1442 .db 0x07,0x5 ;dlzka,typ deskriptoru - endpoint 1443 .db 0x81,0 ;endpoint address; transfer type 1444 .dw 0x08 ;max packet size 1445 .db 10,0 ;polling interval [ms]; dummy byte (pre vyplnenie) 1446 ConfigDescriptorEnd: 1447 ;- Page: 27, 1448 LangIDStringDescriptor: 1449 .db (LangIDStringDescriptorEnd-LangIDStringDescriptor)*2,3 ;dlzka, typ: string deskriptor 1450 .dw 0x0409 ;English 1451 LangIDStringDescriptorEnd: 1452 ;- 1453 VendorStringDescriptor: 1454 .db (VendorStringDescriptorEnd-VendorStringDescriptor)*4-2,3 ;dlzka, typ: string deskriptor 1455 CopyRight: 1456 .db "Ing. Igor Cesko" 1457 CopyRightEnd: 1458 VendorStringDescriptorEnd: 1459 ;- 1460 DevNameStringDescriptor: 1461 .db (DevNameStringDescriptorEnd-DevNameStringDescriptor)*4-2,3;dlzka, typ: string deskriptor 1462 .db "AVR309:USB to UART protocol converter (simple)" 1463 DevNameStringDescriptorEnd: 1464 ;- 1465 MaskPortData: 1466 bst ACC,0 1467 bld temp0,LEDlsb0 1468 bst ACC,1 1469 bld temp0,LEDlsb1 1470 bst ACC,2 1471 bld temp0,LEDlsb2 1472 bst ACC,3 1473 bld temp1,LEDmsb3 1474 bst ACC,4 1475 bld temp1,LEDmsb4 1476 bst ACC,5 1477 bld temp1,LEDmsb5 1478 bst ACC,6 1479 bld temp1,LEDmsb6 1480 bst ACC,7 1481 bld temp1,LEDmsb7 1482 ret 1483 ;- 1484 SetDataPortDirection: 1485 in temp0,LEDdirectionLSB ;nacitaj aktualny stav LSB do temp0 (aby sa nezmenili ostatne smery bitov) 1486 in temp1,LEDdirectionMSB ;nacitaj aktualny stav MSB do temp1 (aby sa nezmenili ostatne smery bitov) 1487 rcall MaskPortData 1488 out LEDdirectionLSB,temp0 ;a update smeru LSB datoveho portu 1489 out LEDdirectionMSB,temp1 ;a update smeru MSB datoveho portu 1490 ret 1491 ;- 1492 SetOutDataPort: 1493 in temp0,LEDPortLSB ;nacitaj aktualny stav LSB do temp0 (aby sa nezmenili ostatne bity) 1494 in temp1,LEDPortMSB ;nacitaj aktualny stav MSB do temp1 (aby sa nezmenili ostatne bity) 1495 rcall MaskPortData 1496 out LEDPortLSB,temp0 ;a update LSB datoveho portu 1497 out LEDPortMSB,temp1 ;a update MSB datoveho portu 1498 ret 1499 ;- 1500 GetInDataPort: 1501 in temp0,LEDPinMSB ;nacitaj aktualny stav MSB do temp0 Page: 28, 1502 in temp1,LEDPinLSB ;nacitaj aktualny stav LSB do temp1 1503 MoveLEDin: 1504 bst temp1,LEDlsb0 ;a daj bity LSB na spravne pozicie (z temp1 do temp0) 1505 bld temp0,0 ;(bity MSB su na spravnom mieste) 1506 bst temp1,LEDlsb1 1507 bld temp0,1 1508 bst temp1,LEDlsb2 1509 bld temp0,2 1510 mov R0,temp0 ;a vysledok uloz do R0 1511 ret 1512 ;- 1513 GetOutDataPort: 1514 in temp0,LEDPortMSB ;nacitaj aktualny stav MSB do temp0 1515 in temp1,LEDPortLSB ;nacitaj aktualny stav LSB do temp1 1516 rjmp MoveLEDin 1517 ;- 1518 GetDataPortDirection: 1519 in temp0,LEDdirectionMSB ;nacitaj aktualny stav MSB do temp0 1520 in temp1,LEDdirectionLSB ;nacitaj aktualny stav LSB do temp1 1521 rjmp MoveLEDin 1522 ;- 1523 EEPROMWrite: 1524 out EEAR,ZL ;nastav adresu EEPROM 1525 out EEDR,R0 ;nastav data do EEPROM 1526 cli ;zakaz prerusenie 1527 sbi EECR,EEMWE ;nastav master write enable 1528 sei ;povol prerusenie (este sa vykona nasledujuca instrukcia) 1529 sbi EECR,EEWE ;samotny zapis 1530 WaitForEEPROMReady: 1531 sbic EECR,EEWE ;pockaj si na koniec zapisu 1532 rjmp WaitForEEPROMReady ;v slucke (max cca 4ms) (kvoli naslednemu citaniu/zapisu) 1533 rjmp OneZeroAnswer ;potvrd prijem jednou nulou 1534 ;- 1535 ;******************************************************************** 1536 ;* End of Program 1537 ;******************************************************************** 1538 ;- 1539 ;- 1540 ;******************************************************************** 1541 ;* End of file 1542 ;******************************************************************** Page: 29]
15

Similar documents

AVR309: Software Universal Serial Bus (USB)
AVR309: Software Universal Serial Bus (USB) Features • USB (Universal Serial Bus) protocol implemented in firmware • Supports Low Speed USB (1.5Mbit/s) in accordance with USB2.0 • Implementation runs on very small AVR devices, from 2kBytes and up • Few external components required - One resistor for
Application Note
8-bit Microcontrollers Application Note AVR270: USB Mouse Demonstration Features • Runs with AT90USB Microcontrollers at 8MHz • USB Low Power Bus Powered Device (less then 100mA) • Supported by any PC running Windows® (98SE or later), Linux® or Mac OS®. • 3Kbytes of Code Required • X, Y Movement, Le
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 2547A–AVR–11/03 AVR244: AVR UART as ANSI Terminal Interface Features • Make use of standard terminal software as user interface to your application. • Enables use of a PC keyboard as input and ascii graphic to display status and control information. • Driv
MPASM USER'S GUIDE with MPLINK and MPLIB MPASM USER'S GUIDE with MPLINK and MPLIB
Adjust Spine to fit MPASM USER'S GUIDE with MPLINK and MPLIB Microchip Technology Inc. 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 602.786.7200 Fax: 602.899.9210 © 1999 Microchip Technology Inc., Printed in the U.S.A. 3/99 DS33014 MPASM USER'S GUIDE with MPLINK and MPLIB Information only.
Microcontroller Core Features: RA5/SS/AN4 7 34 RB1RE0/RD/AN5 8 33 RB0/INT
Device Pins A/D PSP Pin Diagram PIC16C63A 28 NO NO PDIP, Windowed CERDIP PIC16C73B 28 YES NO MCLR/VPP 1 40 RB7 PIC16C65B 40 NO YES RA0/AN0 2 39 RB6 RA1/AN1 3 38 RB5 PIC16C74B 40 YES YES RA2/AN2 4 37 RB4 RA3/AN3/VREF 5 36 RB3 RA4/T0CKI 6 35 RB2 Microcontroller Core Features: RA5/SS/AN4 7 34 RB1RE0/RD
PACKAGE OPTION ADDENDUM
PCM2704 and PCM2705 Not Recommended For New Designs PCM2704, PCM2705 PCM2706, PCM2707 Burr-Brown Audio www.ti.com... SLES081F–JUNE 2003–REVISED JANUARY 2009 STEREO AUDIO DAC WITH USB INTERFACE, SINGLE-ENDED HEADPHONE OUTPUT AND S/PDIF OUTPUT 1FEATURES – External ROM Interface (PCM2704/6) 2345• On-Ch
14 + 14W STEREO AMPLIFIER WITH MUTE & ST-BY
TDA7269A 14 + 14W STEREO AMPLIFIER WITH MUTE & ST-BY WIDE SUPPLY VOLTAGE RANGE UP TO ±20V SPLIT SUPPLY HIGH OUTPUT POWER 14 + 14W @ THD =10%, RL = 8Ω, VS = +16V NO POP AT TURN-ON/OFF MUTE (POP FREE) STAND-BY FEATURE (LOW Iq) SHORT CIRCUIT PROTECTION TO GND THERMAL OVERLOAD PROTECTION Multiwatt11 OR
FOREWORD This repair manual has been prepared to provide essential in-
FOREWORD This repair manual has been prepared to provide essential in- formation on body panel repair methods (including cutting and welding operations, but excluding painting) for the TOYOTA YARIS. Applicable models: KSP90 series Applicable models: NCP90, 91 series This manual consists of body repa
MPASM and MPLINK PICmicro® QUICK REFERENCE GUIDE
MPASM and MPLINK PICmicro® QUICK REFERENCE GUIDE The Embedded Control Solutions Company® MPASM Quick Reference Guide This Quick Reference Guide gives all the instructions, directives, and command line options for the Microchip MPASM Assembler. MPASM Directive Language Summary Directive Description S
M INTRODUCTION
M Author: Mark Palmer Microchip Technology Inc. INTRODUCTION The PICmicro™ families of RISC microcontrollers are designed to provide advanced performance and a cost-effective solution for a variety of applications. To address these applications, there is the PIC16CXXX microcontroller family of produ
M ENGINE ON-VEHICLE INSPECTION ASSEMBLY
1NZ-FE ENGINE MECHANICAL – ENGINE EM–1 M ENGINE ON-VEHICLE INSPECTION 1. INSPECT ENGINE COOLANT (See page CO-1) 2. INSPECT ENGINE OIL (See page LU-1) 3. INSPECT BATTERY (See page CH-4) 4. INSPECT AIR CLEANER FILTER ELEMENT SUB- ASSEMBLY (a) Remove the air cleaner filter element sub-assembly. (b) Vis
FOREWORD This wiring diagram manual has been prepared to provide information on the electrical system of the 2007 YARIS. Applicable models: NCP91, 93 Series
FOREWORD This wiring diagram manual has been prepared to provide information on the electrical system of the 2007 YARIS. Applicable models: NCP91, 93 Series Refer to the following manuals for additional service specifications and repair procedures for these models: Manual Name Pub. No. 2007 YARIS Re
X AUTOMATIC TRANSAXLE SYSTEM PRECAUTION
U340E AUTOMATIC TRANSAXLE – AUTOMATIC TRANSAXLE SYSTEM AX–1 X AUTOMATIC TRANSAXLE SYSTEM PRECAUTION NOTICE: • Perform the RESET MEMORY (AT initialization) when replacing the automatic transaxle assembly, engine assembly or ECM (See page AX-14). • Perform the REGISTRATION (VIN registration) when repl
ON Semiconductor 2N5550 Amplifier Transistors NPN Silicon 2N5551*
ON Semiconductor 2N5550 Amplifier Transistors NPN Silicon 2N5551* *ON Semiconductor Preferred Device MAXIMUM RATINGS Rating Symbol 2N5550 2N5551 Unit Collector–Emitter Voltage VCEO 140 160 Vdc Collector–Base Voltage VCBO 160 180 Vdc Emitter–Base Voltage VEBO 6.0 Vdc Collector Current — Continuous IC
GENERAL DESCRIPTION QUICK REFERENCE DATA PINNING - TO92 variant PIN CONFIGURATION SYMBOL
GENERAL DESCRIPTION QUICK REFERENCE DATA Glass passivated sensitive gate SYMBOL PARAMETER MAX. UNIT thyristor in a plastic envelope, intended for use in general purpose VDRM, Repetitive peak off-state voltages 200 V switching and phase control VRRM applications. This device is intended IT(AV) Averag
N-Channel JFETs
N-Channel JFETs 2N4117A PN4117A SST4117 2N4118A PN4118A SST4118 2N4119A PN4119A SST4119 Part Number VGS(off) (V) V(BR)GSS Min (V) gfs Min (S) IDSS Min (A) 4117 –0.6 to –1.8 –40 70 30 4118 –1 to –3 –40 80 80 4119 –2 to –6 –40 100 200 Ultra-Low Leakage: 0.2 pA Insignificant Signal Loss/Error Voltage
Order this document SEMICONDUCTOR TECHNICAL DATA by 2N3903/D NPN Silicon
Order this document SEMICONDUCTOR TECHNICAL DATA by 2N3903/D NPN Silicon *Motorola Preferred Device COLLECTOR BASE EMITTER 1 MAXIMUM RATINGS Rating Symbol Value Unit CASE 29–04, STYLE 1 TO–92 (TO–226AA) Collector–Emitter Voltage VCEO 40 Vdc Collector–Base Voltage VCBO 60 Vdc Emitter–Base Voltage VEB
DISCRETE SEMICONDUCTORS DATA SHEET 2N2222; 2N2222A NPN switching transistors Product specification 1997 May 29 Supersedes data of September 1994 File under Discrete Semiconductors, SC04
DISCRETE SEMICONDUCTORS DATA SHEET M3D125 2N2222; 2N2222A NPN switching transistors Product specification 1997 May 29 Supersedes data of September 1994 File under Discrete Semiconductors, SC04 FEATURES PINNING • High current (max. 800 mA) PIN DESCRIPTION • Low voltage (max. 40 V). 1 emitter 2 base A
Small-signal Transistors Selection guide
Philips Semiconductors Small-signal Transistors Selection guide V TYPE CEO IC Ptot fhhTPNP PACKAGE max. max. max. FE FE min. PAGE NUMBER min. max. COMPL. (V) (mA) (mW) (MHz) BC846 SOT23 65 100 250 110 450 100 BC856 305 BC846A SOT23 65 100 250 110 220 100 BC856A 305 BC846AT SC-75 65 100 150 110 220 1
Small-signal Transistors Selection guide
Philips Semiconductors Small-signal Transistors Selection guide SURFACE-MOUNT DEVICES NPN GENERAL PURPOSE LOW-POWER TRANSISTORSVIPfTYPE CEO C tothhTPNP PACKAGE max. max. max. FE FE min. PAGE NUMBER min. max. COMPL. (V) (mA) (mW) (MHz) 2PC4081 SC-70 40 100 200 120 560 100 2PA1576 210 2PC4081Q SC-70 4
Small-signal Transistors Selection guide
Philips Semiconductors Small-signal Transistors Selection guide LEADED DEVICES (continued) NPN HIGH-VOLTAGE POWER TRANSISTORSVIPfTYPE CEO C tothhTPACKAGE max. max. max. FE FE PNP min. PAGE NUMBER min. max. COMPL. (V) (mA) (mW) (MHz) BF419 TO-126 250 300 6000 45 typ. >45 90 – 532 BF457 TO-126 160 100
DISCRETE SEMICONDUCTORS DATA SHEET 1PS302 High-speed double diode Product specification 1996 Apr 03 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS302 High-speed double diode Product specification 1996 Apr 03 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Very small plastic SMD package The 1PS302 consists of two PIN DESCRIPTION • High switching speed: max.
Small-signal Transistors Selection guide
Philips Semiconductors Small-signal Transistors Selection guide LEADED DEVICES NPN GENERAL PURPOSE LOW-POWER TRANSISTORSVIPfTYPE CEO C tothhTPACKAGE max. max. max. FE FE PNP min. PAGE NUMBER min. max. COMPL. (V) (mA) (mW) (MHz) 2N2484 TO-18 60 50 360 250 800 60 – 131 2N4124 TO-92 25 200 500 120 360
DISCRETE SEMICONDUCTORS DATA SHEET 1PS301 High-speed double diode Product specification 1996 Apr 03 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS301 High-speed double diode Product specification 1996 Apr 03 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Very small plastic SMD package The 1PS301 consists of two PIN DESCRIPTION • High switching speed: max.
DISCRETE SEMICONDUCTORS DATA SHEET 1PS300 High-speed double diode Product specification 1996 Apr 03 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS300 High-speed double diode Product specification 1996 Apr 03 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Very small plastic SMD package The 1PS300 consists of two PIN DESCRIPTION • High switching speed: max.
DISCRETE SEMICONDUCTORS DATA SHEET 1PS226 High-speed double diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS226 High-speed double diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Small plastic SMD package The 1PS226 consists of two PIN DESCRIPTION
DISCRETE SEMICONDUCTORS DATA SHEET 1PS193 High-speed diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS193 High-speed diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Small plastic SMD package The 1PS193 is a high-speed PIN DESCRIPTION • High
DISCRETE SEMICONDUCTORS DATA SHEET 1PS184 High-speed double diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS184 High-speed double diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Small plastic SMD package The 1PS184 consists of two PIN DESCRIPTION
DISCRETE SEMICONDUCTORS DATA SHEET 1PS181 High-speed double diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET handbook, halfpage M3D114 1PS181 High-speed double diode Product specification 1996 Apr 03 Supersedes data of December 1993 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION PINNING • Small plastic SMD package The 1PS181 consists of two PIN DESCRIPTION
DISCRETE SEMICONDUCTORS DATA SHEET 1N914; 1N916 High-speed diodes Product specification 1996 Apr 10 Supersedes data of April 1992 File under Discrete Semiconductors, SC01
DISCRETE SEMICONDUCTORS DATA SHEET M3D176 1N914; 1N916 High-speed diodes Product specification 1996 Apr 10 Supersedes data of April 1992 File under Discrete Semiconductors, SC01 FEATURES DESCRIPTION • Hermetically sealed leaded glass The 1N914; 1N916 are high-speed switching diodes fabricated in pla