Cov txheej txheem:

Bus Pirate 3EEPROM Explorer Board: 5 Kauj Ruam
Bus Pirate 3EEPROM Explorer Board: 5 Kauj Ruam
Anonim
Tsheb Npav Pirate 3EEPROM Explorer Board
Tsheb Npav Pirate 3EEPROM Explorer Board

Yog tias koj tau txais ib qho ntawm Hack a Day's Bus Pirates, koj ua dab tsi nrog nws? Kawm paub txog 1-xaim, I2C, thiab SPI EEPROMs nrog 3EEPROM tshawb xyuas pawg thawj coj (peb hu nws yog THR-EE-PROM). EEPROM yog ib hom nco nti uas khaws cov ntaub ntawv yam tsis muaj lub zog txuas ntxiv. Nws muaj txiaj ntsig zoo rau kev khaws cov ntaub ntawv ruaj khov hauv cov xov tooj cua me me, lossis tuav cov nplooj ntawv kev cai hauv lub vev xaib mini. EEPROMs tuaj nyob rau ntau qhov ntau thiab txheej txheem. 3EEPROM muaj peb yam EEPROM chips: DS2431 (1-Wire), 24AA- (I2C), thiab 25AA- (SPI). Txhua qhov peb tau pom yav dhau los ntawm Hack Ib Hnub, tab sis txhua qhov kev qhia siv qhov sib txawv ntawm Bus Pirate kho vajtse thiab kho vajtse, nws nyuaj rau tus pib ua raws kev siv Tsheb Npav Pirate v2go. DS2431, 24AA-, thiab 25AA- EEPROMs nrog Bus Pirate v2go. Peb kuj tseem tau txais tag nrho cov cav sib tham ua cov ntawv hauv kab ntawv yog li koj yuav tsis nco ib qho lus tshwj xeeb. PCBs yog kwv yees li $ 10, cov khoom siv txog $ 15, xa mus thoob ntiaj teb. Peb yuav tsum npaj pab pawg yuav khoom ntawm 10 PCBs lossis 20 cov khoom siv kom pib. Yog tias koj txaus siab rau Tsheb Npav Pirate, version 3 tab tom los. Kuv tsis tuaj yeem suav nrog qee cov qauv txheej txheem thiab HTML cov lus hauv Cov Lus Qhia, koj tuaj yeem pom thawj daim ntawv tshaj tawm ntawm Cov Ntawv Tsis Txaus Siab blog.

Kauj Ruam 1: 3EEPROM Txheej Txheem Kho Vajtse

3EEPROM Khoos Phis Tawj Txheej Txheem
3EEPROM Khoos Phis Tawj Txheej Txheem
3EEPROM Khoos Phis Tawj Txheej Txheem
3EEPROM Khoos Phis Tawj Txheej Txheem
3EEPROM Khoos Phis Tawj Txheej Txheem
3EEPROM Khoos Phis Tawj Txheej Txheem

Lub hom phiaj ntawm tsab ntawv no yog kawm txog EEPROM thiab peb txoj kev tsheb npav sib xws. Ua ntej, peb saib 3EEPROM PCB, tom qab ntawd peb ua qauv qhia txhua EEPROM siv Bus Bus Pirate universal serial interface tool. Yog tias koj tsis muaj Tsheb Npaum Pirate, koj tseem tuaj yeem ua raws vim qhov kev txiav txim yooj yim ntawm kev ua haujlwm sib xws tseem zoo ib yam txawm koj yuav siv lawv li cas. CircuitFull size schematic [PNG]. Peb tau tsim cov Circuit thiab PCB siv cov dawb software ntawm Cadsoft Eagle. Koj tuaj yeem rub tawm cov txheej txheem thiab PCB los ntawm Bus Pirate SVN archive. Qhov 3EEPROM PCB tuav DS2431 1-Wire EEPROM (IC1), 24AA- I2C EEPROM (IC4), thiab 25AA- SPI EEPROM (IC5). The DS2431 (IC1) thim lub zog tawm ntawm lub npav 1-Hlau, nws tsis muaj tus pin fais fab sab nraud thiab tsis xav tau lub tshuab txiav tawm. IC2 thiab IC3 tsis muaj qhov khoob ntxiv rau 1-Cov khoom siv ntxiv, zoo li lwm DS2431 lossis DS1822 qhov ntsuas kub. C1 (0.01uF) yog nyob ntawm yeem thiab tsuas yog xav tau yog IC2 lossis IC3 muaj neeg nyob nrog lub zog 1-Hlau ntaus ntawv. 1-Hlau xav tau lub zog rub tawm qhov siab, qhov siab tshaj ntawm 2.2K ohms. Lub Tsheb Npav Pirate tus neeg tsav nkoj rub tawm tus neeg tawm tsam yog 10K, tsis muaj zog txaus los ua kom muaj zog DS2431 thaum sau. 3EEPROM tshawb xyuas pawg thawj coj suav nrog 1.8k ohm, 1/8th watt rub-up resistor (R1) ntawm 1-Wire npav kom tsis muaj qhov rub tawm ntxiv resistor xav tau. Qhov 24AA- (IC4) thiab 25AA- (IC5) txhua tus tau txais 0.1uF capacitor los txiav lawv los ntawm cov khoom siv hluav taws xob (C2, C3). Tej zaum koj tsis xav tau cov capacitors hauv qhov yooj yim Circuit Court, peb tshem tawm lawv los ntawm pawg thawj coj hauv kev ua qauv qhia. Lub tsheb npav I2C siv los ntawm 24AA- kuj yuav tsum tau rub tawm cov neeg tawm tsam, tab sis Tsheb Npav Pirate tus tsav tsheb hauv 10K ohm rub tawm cov neeg tawm tsam txaus. Lub Circuit Court tau siv los ntawm VCC thiab GND tus pin ntawm jumper 3. Muaj ob lub VCC tus pin, ib qho yog rau lub zog, lwm qhov yog rau Bus Pirate tus rub-up resistor voltage input pin (Vpullup). PCBWe ua lub Circuit Court thiab PCB siv freeware version ntawm Cadsoft Eagle. Koj tuaj yeem rub tawm cov txheej txheem thiab PCB los ntawm Bus Pirate SVN cov ntawv khaws tseg. Yog tias koj xav tau kev npaj ua haujlwm PCB lossis 3EEPROM cov khoom siv, peb yuav tuaj yeem npaj cov pab pawg yog tias 10 lossis 20 tus neeg txaus siab. Daim ntawv teev npe R1 1800 ohm resistor (1/8th watt) C2, 3 0.1uF capacitor/10volts+JP1-4 0.1 "txiv neej tus pin headerIC1 DS2431 1K 1-wire EEPROM TO-92IC4 ** 24AA014-I/P I2C EEPROM DIP8IC5 ** 25AA010A-I/P SPI EEPROM DIP8ICS4, 5 8 tus pin DIP qhov rau IC5, 6 ** IC4, IC5 tuaj yeem yog qhov loj me, peb txuas rau cov chips me me, peb siv 128bytes thiab 128Kbytes. Kuv tsis suav nrog qee cov qauv thiab HTML cov ntxhuav hauv Kev Qhia Ntawv, koj tuaj yeem pom thawj daim ntawv tshaj tawm ntawm Cov Ntawv Tsis Txaus Siab blog.

Kauj Ruam 2: 25AA- / 25LC- SPI EEPROM

25AA- / 25LC- SPI EEPROM
25AA- / 25LC- SPI EEPROM
25AA- / 25LC- SPI EEPROM
25AA- / 25LC- SPI EEPROM
25AA- / 25LC- SPI EEPROM
25AA- / 25LC- SPI EEPROM

Kev tawm tsam EEPROM txhua qhov zoo li zoo ib yam. Peb yuav sau ob peb tus lej rau tus nti, thiab tom qab ntawd nyeem lawv. Txhua lub cuab yeej muaj cov xwm txheej uas thov ib zaug koj xav sau ntau dua ob peb qhov txiaj ntsig, xws li nplooj ntawv loj thiab txwv kev txwv. Nyeem ntxiv txog cov no hauv kab ntawv rau koj lub cuab yeej tshwj xeeb. Pull-up resistors yog qhov teeb meem feem ntau, txheeb xyuas qhov rub tawm tus pin siv cov ntawv qhia zaub mov 'v' hauv Bus Pirate davhlau ya nyob twg. Chip: 25AA, SPI EEPROM (1Kbyte). Bus: SPI. Pull-up resistors tsuas yog xav tau rau kev sib xyaw ua hluav taws xob cuam tshuam. Power xav tau: 1.8volts rau 5.5volts (AA), 2.5volts rau 5.5volt (LC). References: cov ntaub ntawv, Hack ib hnub ua qauv qhia kom tiav Bus Bus Pirate session log rau qhov kev qhia no. Kuv tsis tuaj yeem suav qee qhov kev teeb tsa thiab HTML cov lus hauv Cov Ntawv Qhia, koj tuaj yeem pom qhov qub ntawm Cov Ntawv Tsis Txaus Siab blog. AA ntu khiav los ntawm 1.8volts txog 5.5volts, thaum 25LC- ntu muaj 2.5volt yam tsawg kawg nkaus yuav tsum tau. C3 (0.1uF) decouples SPI EEPROM los ntawm cov khoom siv hluav taws xob. Kev sau tiv thaiv (WP) thiab tuav tus pin tuaj yeem tswj tau los ntawm microcontroller, tab sis peb xiam lawv los ntawm kev tuav cov pins no siab. SPI cov npav npav, CS, DO, CLK, thiab DI, raug coj mus rau lub taub hau JP4. Teeb Yog tias koj siv Bus Pirate, txuas nws mus rau 3EEPROM lossis 25AA- IC raws li qhia hauv daim duab duab hauv qab no. SPI ib txwm tsis xav tau rub tawm cov neeg tawm tsam. Kev cuam tshuam hauv Lub Tsheb Npav Pirate lub dav hlau nias 'm' rau hom ntawv qhia zaub mov thiab xaiv SPI. Kho kho lub tsev qiv ntawv SPI rau tus pin tus lej ib txwm, siv qhov tsis raug rau txhua lwm yam SPI hom teeb tsa. Pab kom cov khoom siv fais fab (loj 'W') ntawm SPI hom tam sim. Thaum kawg, tau txais daim ntawv tshaj tawm hluav taws xob kom ntseeg tau tias lub zog siv hluav taws xob ua haujlwm ('v'). Pull-up resistors tsis xav tau rau qhov kev qhia no. Yog tias koj xav cuam tshuam nrog EEPROM siv los ntawm 5volts, siv SPI lub tsev qiv ntawv hauv qhib qhib tus lej (HiZ) tus pin hom thiab pab kom rub tawm cov neeg tawm tsam nrog Vpullup tus pin (Vpu) txuas nrog EEPROM lub zog siv. Kauj ruam 1, tua sau-tiv thaiv 'SPI> [0b110] CS ENABLED <<< nti xaiv enabledWRITE: 0x06 <<< lov tes taw sau tiv thaiv commandCS DISABLED <<25AA- tau sau kev tiv thaiv ntawm lub zog-rau. Qis qis dua xaiv (CS) ([), xa cov ntawv sau tsis ua haujlwm tiv thaiv kev hais kom ua (0x06), thiab tom qab ntawd tsa CS (]) txhawm rau pab sau ntawv mus rau EEPROM. 0b110 thiab Bus Pirate tseem nkag siab. Kauj Ruam 2, sau qee qhov txiaj ntsig 'SPI> [0b10 0 3 2 1] CS ENABLED <<< nti xaiv enabledWRITE: 0x02 <<< sau cov lus txibWRITE: 0x00 <<< sau qhov chaw pib WRITE: 0x03 <<< 3 qhov tseem ceeb los sau (3, 2, 1) WRITE: 0x02WRITE: 0x01CS DISABLED <<Tam sim no EEPROM sau tau. Ua ntej, txo CS kom qhib 25AA- ([). Tom ntej no, xa cov lus txib (0x02) thiab qhov chaw pib sau (0). Xa cov ntaub ntawv khaws cia (3 2 1), tom qab ntawd nce CS (]) kom txuag tau qhov txiaj ntsig. Nco tseg: peb siv me me 128byte EEPROM, cov chips loj dua yuav siv 16 ntsis (2 byte) chaw nyob. Cov lus txib no yuav yog [0b10 0 '' 0 '' 3 2 1] rau EEPROMs loj dua 256bytes, nco ntsoov qhov thib ob 0. Txheeb cov ntawv rau koj li EEPROM kom ntseeg tau. Kauj Ruam 3, nyeem qhov tseem ceeb rov qab SPI> [0b11 0 r: 3] CS ENABLED <<< nti xaiv enabledWRITE: 0x03 <<< nyeem cov lus txibWRITE: 0x00 <<< nyeem pib chaw nyob BULK NYEEM 0x03 BYTES: <<< nyeem 3 qhov tseem ceeb 0x03 0x02 0x01CS DISABLED <<Thaum kawg, nyeem cov ntaub ntawv rov qab los txheeb xyuas tias kev sau tau ua tiav. Xaiv 25AA- ([), xa nyeem cov lus txib (0x03) thiab pib qhov chaw nyob (0), thiab tom qab ntawv nyeem peb qhov tseem ceeb (r: 3). Tsa CS kom ua tiav qhov kev sib pauv (]). Qhov tseem ceeb sib phim, sau tau zoo. Nco tseg: peb siv me me 128byte EEPROM, cov chips loj dua yuav siv 16 ntsis (2 byte) chaw nyob. Cov lus txib no yuav yog [0b11 0 '' 0 '' r: 3] rau EEPROMs loj dua 256bytes, nco ntsoov qhov thib ob 0. Txheeb cov ntawv rau koj li EEPROM kom ntseeg tau.

Kauj Ruam 3: 24AA- / 24LC I2C EEPROM

24AA- / 24LC I2C EEPROM
24AA- / 24LC I2C EEPROM
24AA- / 24LC I2C EEPROM
24AA- / 24LC I2C EEPROM
24AA- / 24LC I2C EEPROM
24AA- / 24LC I2C EEPROM

Chip: 24AA, I2C EEPROM (1Kbyte). Bus: I2C, rub-resistors xav tau. Power xav tau: 1.8volts rau 5.5volts (24AA), 2.5volts rau 5.5volt (24LC). References: datasheet, Hack Ib hnub ua qauv qhia. Ua tiav Tsheb Npav Pirate ntu kev sib tham rau qhov ua qauv qhia no. Kuv tsis tuaj yeem suav qee qhov kev teeb tsa thiab HTML cov lus hauv Cov Lus Qhia, koj tuaj yeem pom qhov qub ntawm Cov Ntawv Tsis Txaus Siab blog. IC4 yog 24AA- series I2C EEPROM los ntawm Microchip, cov EEPROMs no tuaj rau hauv tuj ntawm qhov ntau thiab tsawg. AA ntu ua haujlwm los ntawm 1.8volts txog 5.5volts, thaum 24LC- ntu muaj 2.5volt yam tsawg kawg nkaus xav tau A 0.1uF capacitor (C2) decouples IC4 los ntawm lub hwj chim. Kev sau tiv thaiv tus pin (WP) tuaj yeem tswj tau los ntawm lub microcontroller, tab sis rau qhov ua piv txwv yooj yim no peb kaw nws nrog kev txuas rau hauv av. I2C npav npav, SDA thiab SCL, raug coj tawm mus rau header JP2. Qhov chaw nyob feem ntau 24AA EEPROMs yog 1010AAAS, nrog plaub qhov kawg txiav txim siab los ntawm chaw nyob pins (A0, A1, A2) thiab nyeem/sau hom xaiv me ntsis (S). Txhua qhov chaw nyob me ntsis yog hauv qhov piv txwv no, yog li sau qhov chaw nyob ntawm EEPROM yog 10100000 (nplooj ntawv nplooj ntawv 6). Teeb Yog tias koj siv Bus Pirate, txuas nws mus rau 3EEPROM lossis 24AA- IC raws li qhia hauv daim duab duab hauv qab no. I2C yog lub npav npav ob tog uas xav tau rub tawm cov neeg tawm tsam ntawm ob tus pin. Koj tuaj yeem siv Bus Pirate's on-board pull-up resistors los ntawm kev txuas Vpullup (Vpu) tus pin rau 3.3volt fais fab mov thiab ua kom lawv nyob hauv lub davhlau ya nyob twg. Kev cuam tshuam kev ceeb toom: Tsis yog txhua I2C EEPROMs ua haujlwm ib yam. Piv txwv li, 24AA01 me me, muaj qhov sib txawv kiag li hais thiab hais kom ua. Nco ntsoov xyuas cov ntawv teev npe rau koj cov nti. Nias 'm' hauv Bus Pirate lub davhlau ya nyob twg thiab xaiv I2C los ntawm cov ntawv qhia zaub mov. Pab kom cov khoom siv hluav taws xob (loj 'W') thiab cov khoom tiv thaiv rub tawm ('p', xaiv 2) ntawm I2C sai. Tau txais daim ntawv tshaj tawm hluav taws xob ('v') kom paub tseeb tias cov khoom siv hluav taws xob tau qhib thiab Vpullup tus pin txuas nrog qhov hluav taws xob. I2C> (0) <<(1) <<< siv qhov chaw tshawb nrhiav macroSearching 7bit I2C chaw nyob. Nrhiav cov cuab yeej ntawm: 0xA0 0xA1 <<Peb twb paub lawm tias qhov chaw nyob I2C yog 10100000, tab sis peb tseem tuaj yeem siv Bus Pirate's I2C search macro (1) los tshawb nrhiav 24AA-. Kev tshawb nrhiav macro pom lub cuab yeej ntawm qhov kev cia siab sau (0xA0) thiab nyeem (0xA1) chaw nyob. Kauj Ruam 1, sau qee qhov tseem ceeb I2C> [0b10100000 0 0 3 2 1] I2C SAWV DAWS <<< I2C pib mobWRITE: 0xA0 GOT ACK: YES <<< 24AA- sau qhov chaw WRITE: 0x00 GOT ACK: YOG <<< sau chaw nyob byte 1WRITE: 0x00 GOT ACK: YES <<< sau chaw nyob byte 2WRITE: 0x03 GOT ACK: YES <<< 3 qhov tseem ceeb los sau (3, 2, 1) WRITE: 0x02 GOT ACK: YESWRITE: 0x01 GOT ACK: YESI2C STOP CONDITION < <Pib sau nrog I2C pib mob ([), ua raws los ntawm 24AA- sau chaw nyob (0xa0). Tom ntej no, xa 16 qhov chaw nyob sau rau ntawm (0 0) thiab cov ntaub ntawv sau (3 2 1). Xaus qhov kev sib pauv I2C nrog qhov xwm txheej nres (]). Kauj Ruam 2, tso tus nyeem ntawv taw qhia I2C> [0b10100000 0 0] I2C SAWV DAWS <<< I2C pib mobWRITE: 0xA0 GOT ACK: YOG <<< 24AA- sau qhov chaw WRITE: 0x00 GOT ACK: YOG <<< sau chaw nyob byte 1WRITE: 0x00 GOT ACK: YOG <<< sau chaw nyob byte 2I2C STOP CONDITION <<Nws yuav siv ob txoj haujlwm los nyeem los ntawm 24AA-. Ib txoj haujlwm nyeem/sau tus taw tes, lwm qhov rov qab qhov txiaj ntsig. Pib nrog I2C pib mob ([) thiab sau chaw nyob (0xa0). Xa 16 qhov chaw nyob kom nyeem (0 0), thiab tom qab ntawv nres qhov xwm txheej (]). Peb tsis tau xa cov ntaub ntawv los sau lub sijhawm no, peb tsuas yog tso tus nyeem/sau tus taw tes rov qab mus rau qhov pib ntawm cov ntaub ntawv peb tau sau hauv kauj ruam 1. Kauj Ruam 3, nyeem qee qhov tseem ceeb I2C> [0b10100001 r: 3] I2C START CONDITION <<< I2C pib mobWRITE: 0xA1 GOT ACK: YES <<< 24AA- nyeem qhov chaw nyob BULK Nyeem 0x03 BYTES: <<< nyeem 3 qhov tseem ceeb 0x03 0x02 0x01I2C NTSHAW NTSUAS <<Kauj ruam 2 teeb tsa tus nyeem/sau tus taw tes rau qhov pib ntawm cov ntaub ntawv peb xav nyeem. Tam sim no peb tuaj yeem nyeem cov ntaub ntawv siv 24AA- nyeem chaw nyob. Pib nrog I2C pib mob ([) thiab 24AA- nyeem chaw nyob (0xa1). Nyeem peb qhov txiaj ntsig peb tau sau hauv qib 1 (r: 3), thiab xaus nrog qhov xwm txheej nres (]). Yog tias qhov txiaj ntsig sib xws, tom qab ntawd koj qhov kev sau ntawv tau ua tiav.

Kauj Ruam 4: DS2431 1-Wire EEPROM

DS2431 1-Hlau EEPROM
DS2431 1-Hlau EEPROM
DS2431 1-Hlau EEPROM
DS2431 1-Hlau EEPROM
DS2431 1-Hlau EEPROM
DS2431 1-Hlau EEPROM

Chip: DS2431, 1-wire EEPROM (1Kbyte). Bus: 1-Wire, <2.2Kohm pull-up resistor required. Power requirements: 2.8volts to 5.25volts. References: datasheet, Hack ib hnub ua qauv qhia kom tiav Bus Bus Pirate session log rau qhov ua qauv qhia no. Kuv tsis tuaj yeem suav qee qhov kev teeb tsa thiab HTML cov lus hauv Cov Lus Qhia, koj tuaj yeem pom qhov qub ntawm Cov Ntawv Tsis Txaus Siab blog.. 1-Hlau xav tau lub zog rub tawm qhov siab, qhov siab tshaj ntawm 2.2Kohms. Lub Tsheb Npav Pirate tus neeg tsav nkoj rub tawm tus neeg tawm tsam yog 10K, tsis muaj zog txaus los ua kom muaj zog DS2431 thaum sau. Koj yuav tsum siv 2.2Kohm lossis me dua sab nraud tiv thaiv ntawm lub zog thiab 1-Hlau npav npav. Yog tias koj muaj teeb meem sau cov ntaub ntawv, xyuas kom tseeb tias koj qhov rub tawm cov neeg tawm tsam loj txaus. 3EEPROM tshawb xyuas pawg thawj coj suav nrog 1800 ohm rub tawm tus neeg tawm tsam (R1) ntawm 1-Wire tsheb npav yog li tsis xav tau lwm tus tiv thaiv sab nraud. Teeb Yog tias koj siv Bus Pirate, txuas nws mus rau 3EEPROM board lossis DS2431 raws li qhia hauv daim duab duab hauv qab no. DS2431 tsis xav tau tus pin fais fab mov, nws tau siv ntawm 3EEPROM pawg thawj coj los ua lub zog loj rub tawm tus tiv thaiv rau 1-Hlau npav. Kev sib cuam tshuam Xovxwm 'm' hauv Bus Pirate lub davhlau ya nyob twg thiab xaiv 1-Wire hom. Pab kom cov khoom siv hluav taws xob nyob hauv nkoj (loj 'W') thiab tshawb xyuas qhov ntsuas hluav taws xob (v). Kauj Ruam 1, nrhiav lub cuab yeej chaw nyob 1-WIRE> (0xf0) <<< 1-Wire search macro 1WIRE ROM COMMAND: SEARCH (0xF0) Pom cov cuab yeej ntawm: Macro 1WIRE chaw nyob 1.0x2D 0x54 0xD2 0xEF 0x00 0x00 0x00 0x00 0x2B <<< DS2431 cim tshwj xeeb*DS2431 1K EEPROM <<Txhua 1-Hlau ntaus ntawv muaj qhov tshwj xeeb 8 byte ID. 1-Hlau muaj txheej txheem tshawb nrhiav uas pom tus ID ntawm txhua lub cuab yeej txuas. Lub Tsheb Npav Pirate siv 1-Hlau tshawb nrhiav raws li macro (240). Ntaus '(240)' hauv Bus Pirate lub davhlau ya nyob twg kom pib tshawb nrhiav 1-Wire. Qhov chaw nyob ntawm txhua lub tshuab luam ntawv, paub cov cuab yeej raug txheeb xyuas. Thawj kaum 1-Wire ntaus ntawv chaw nyob tau khaws cia ua macros, hauv qhov piv txwv no peb qhov chaw nyob DS2431 muaj los ntawm kev ntaus '(1)' hauv lub davhlau ya nyob twg. Kauj Ruam 2, sau 8 bytes mus rau lub khauj khaum 1-WIRE> (0x55) (1) 0x0f 0 0 8 7 6 5 4 3 2 11WIRE BUS RESET OK <<< kuj {hais kom 1WIRE WRITE ROM COMMAND: MATCH (0x55) * ua raws nrog 64 qhov chaw nyob 1WIRE ADDRESS MACRO 1: 0x2D 0x54 0xD2 0xEF 0x00 0x00 0x00 0x2B 'WRITE: 0x0F <<< DS2431 sau kos ncoo hais kom ua WRITE: 0x00 <<< DS2431 sau chaw nyob byte 1 WRITE: 0x00 <<< DS2431 sau chaw nyob byte 2WRITE 0x08: uaTom ntej no peb yuav sau 8 bytes mus rau qhov chaw nyob ib ntus hauv DS2431 hu ua lub khauj khaum pib. Ob leeg muaj raws li macro '(0x55)'. Qhov no tseem tuaj yeem ua tiav yam tsis muaj macro los ntawm kev ntaus '{0x55', {xa 1-Wire reset, 0x55 yog 1-Wire MATCH hais kom ua. Tom qab MATCH hais kom ua, xa 8 byte ID ntawm lub cuab yeej mus rau qhov chaw nyob. Peb siv cov lej (1) uas tau nyob nrog DS2431 ID hauv kauj ruam 1. Koj tseem tuaj yeem nkag mus rau 8 byte ID tus kheej. Txog tam sim no DS2431 yuav tsum tau txais nws qhov chaw nyob thiab npaj rau cov lus txib.0x0f yog qhov sau kos cov lus txib, nws qhia rau DS2431 kom cia siab cov ntaub ntawv. Ob qhov tom ntej qhia nws qhov twg tso cov ntaub ntawv, peb yuav khaws nws thaum pib (0 0). Thaum kawg, peb xa 8 bytes ntawm qhov tseem ceeb los khaws, tus lej 8 txog 1. Koj yuav tsum sau tag nrho 8 bytes mus rau DS2431. Ib qho ntxiv, qhov chaw nyob sau yuav tsum yog ntawm tus lej 8 byte. Saib cov ntawv teev npe kom ua tiav cov ntsiab lus ntawm kev txwv kev sau. Kauj Ruam 3, txheeb xyuas qhov khawb qhov khawb thiab tau txais kev tso cai code 1-WIRE> (0x55) (1) 0xaa r: 3 r: 8 r: 2 r: 21WIRE BUS RESET OK <<< chaw nyob ntaus ntawv 1 0x55) *ua raws nrog 64 qhov chaw nyob 1WIRE ADDRESS MACRO 1: 0x2D 0x54 0xD2 0xEF 0x00 0x00 0x00 0x2BWRITE: 0xAA <<< nyeem kos lo lus txib BULK READ 0x03 BYTES: <<< tso cai code0x00 0x00 0x07BULK READ 0x08 BYTES: << 0x0 0x07 0x06 0x05 0x04 0x03 0x02 0x01BULK Nyeem 0x02 BYTES: <<< CRC rau cov ntaub ntawv 0x08 0x86BULK Nyeem 0x02 BYTES: <<Txheeb xyuas tias cov ntaub ntawv tau txais raug, thiab tau txais daim ntawv tso cai tso cai. Pib dua nrog 1-Hlau rov pib dua thiab MATCH hais kom ua macro (0x55), thiab ntaus ntawv chaw nyob macro (1). Lub sijhawm no xa DS2431 nyeem kos daim ntawv hais kom ua (0xAA), thiab tom qab ntawd nyeem tag nrho ntawm 15 bytes. khawb ncoo rau EEPROM. Tom ntej no 8 bytes (r: 8) yuav tsum phim cov ntaub ntawv peb xa hauv kauj ruam 2. Qhov kawg 2 bytes (r: 2) yog CRC16 rau cov ntaub ntawv. Nyeem tom qab CRC xa rov qab tag nrho 1s. Kauj Ruam 4, sau daim ntawv khawb rau EEPROM 1-WIRE> (0x55) (1) 0x55 0x00 0x00 0x071WIRE BUS RESET OK <<< address the device1WIRE WRITE ROM COMMAND: MATCH (0x55) *follow with 64bit address1WIRE ADDRESS MACRO 1: 0x2D 0x54 0xD2 0xEF 0x00 0x00 0x00 0x2BWRITE: 0x55 <<< luam daim ntawv lo lo lus txibWRITE: 0x00 <<< 3 byte tso cai code los ntawm kauj ruam 3WRITE: 0x00WRITE: 0x071-WIRE> Peb muaj txhua yam peb xav tau khaws cov ntaub ntawv khawb tas mus li hauv EEPROM. Address lub cuab yeej, tom qab ntawd xa DS2431 daim ntawv khawb khawb qhov hais kom ua (0x55) ua raws li peb byte kev tso cai tso cai peb rov ua hauv kauj ruam 3 (0x00 0x00 0x07). Yog tias txoj cai tso cai raug, cov ntaub ntawv raug xa mus rau EEPROM. Kauj Ruam 5, txheeb xyuas qhov khawb ncoo sau 1-WIRE> (0x55) (1) 0xaa r: 31WIRE BUS RESET OK <<< chaw nyob ntaus ntawv 1WIRE WRITE ROM COMMAND: MATCH (0x55) *ua raws nrog 64 ntsis chaw nyob 1WIRE ADDRESS MACRO 1: 0x2D 0x54 0xD2 0xEF 0x00 0x00 0x00 0x00 0x2BWRITE: 0xAA <<< nyeem kos cov lus txib BULK Nyeem 0x03 BYTES: 0x00 0x00 0x87 <<DS2431 teeb tsa sab saud feem ntau me ntsis ntawm kev sau ntawv tso cai tom qab ua tiav daim ntawv khawb ncoo hais kom ua. Xa lwm qhov nyeem cov ntawv khawb khawb (0xAA) kom tau txais daim ntawv tso cai hloov tshiab, tab sis tsuas yog nyeem thawj peb bytes (r: 3). Tus nqi yav dhau los 0x07 tau hloov mus rau 0x87, daim ntawv hais kom ua tau txais ua tiav. Kauj Ruam 6, nyeem rov qab qhov muaj nuj nqis 1-WIRE> (0x55) (1) 0xf0 0x00 0x00 r: 8 r: 81WIRE BUS RESET OK <<< chaw nyob ntaus ntawv 1WIRE WRITE ROM COMMAND: MATCH (0x55) *ua raws nrog 64 ntsis chaw nyob 1WIRE ADDRESS MACRO 1: 0x2D 0x54 0xD2 0xEF 0x00 0x00 0x00 0x2BWRITE: 0xF0 <<< DS2431 nyeem cov lus txib WRITE: 0x00 <<< 2 byte nyeem qhov chaw 0x08 BYTES: <<Txheeb xyuas qhov sau ua haujlwm kom raug los ntawm kev rov ua qhov qub. Chaw nyob DS2431, tom qab ntawv xa nyeem cov lus txib (0xf0) thiab qhov chaw nyob nyeem los ntawm (0x00 0x00). Peb nyeem yim bytes peb tau sau ua ntej (r: 8), uas tau xa rov qab qhov kev cia siab. Yim bytes dhau ntawm cov txiaj ntsig no tsis tau sau thiab xa rov qab 0.

Kauj Ruam 5: Xaus

Xaus
Xaus

Xaus qhov qauv no qhia txog EEPROM nco, thiab qhia txog kev siv Bus Pirate nrog peb yam kev cai: 1-Wire, I2C, thiab SPI. qhov xav tau ntau dua 1-Hlau npav nrog cov khoom siv sib kis tau zoo. Peb tuaj yeem muaj 3EEPROM tshawb xyuas lub rooj tsav xwm PCBs lossis cov khoom siv tsim tawm ntawm Seeed Studio. PCBs yog kwv yees li $ 10, cov khoom siv txog $ 15, xa mus thoob ntiaj teb. Peb yuav tsum npaj pab pawg yuav khoom ntawm 10 PCB lossis 20 cov khoom siv kom pib.

Pom zoo: