PIC microcontroller software simulation IIC read and write routines

Single Chip Microcomputer STM32L151CCU6
1206RGB (Single)
0201 Package SLP0603 ESD Electrostatic Diode 5V One-Way ESD
Mobile Phone Crystal 3.2*2.5mm 3225 26M (26.000MHZ) 7.5PF 10PPM 20PPM 30PPM
Test - Lowercase JPG
I2C Bus Program ; This is an EEPROM read and write program ; The special storage RAM unit Wequ0 F0equ0 rtCCequ1 Pcequ2 F2equ2 F3equ3 F4equ4 Raequ5 Rbequ6 Rcequ7 Pclathequ0ah iNTConequ0bh Pirlequ0ch Tmr1lequ0eh Tmr1hequ0fh T1conequ10h Tmr2equ11h T2conequ12h Sspbufequ13h Sspconequ14h Ccpr1lequ15h Ccpr1hequ16h Ccpconequ17h Adcon0equ1fh ; ; In the bank1 trISAequ85h Trisbequ86h Triscequ87h Pconequ8eh Pie1equ8ch Pr2equ92h Sspaddequ93h Sspstatequ94h Adcon1equ9fh ; ;------------------------------------------------- ------- ; The general storage RAM unit ; Temp6equ76h Temp7equ77h ; eepCTRequ6dh; EEPROM control words buffer Eepaddrequ6eh; EEPROM address buffer Eepdataequ6fh; EEPROM data buffer ; ;------------------------------------------------- ------- ; The bits of a RAM unit Sclequ3; RC Sdaequ4; RC ; Pdequ3; status Toequ4; status ; Rbifequ0; INTCON Intifequ1; INTCON Rtifequ2; INTCON Rbieequ3; INTCON Intieequ4; INTCON Rtieequ5; INTCON Adieequ6; INTCON Gieequ7; INTCON ; ;------------------------------------------------- --------- ; The contact Sda_inequ10h Sda_outequ00h ; ;------------------------------------------------- --------- Org000h Gotomain_program ;------------------------------------------------- ------- ; The son-program area ;------------------------------------------------- ------- Org005h ;------------------------------------------------- ------- Make_s Bsf rc, sda Bsff3,5 ;bsf rc, sda MOVlwsda_out MOVwf trisc Bcff3,5 Nop Ack_check Bsff3,5 ;bcf rc, sda MOVlwsda_in MOVwf trisc Bcff3,5 Nop M_start Bsf rc, scl Nop Btfss rc, sda Gotomake_s M_start0 Bsf rc, scl Bcf rc, sda Bsff3,5 ;bsf rc, sda MOVlwsda_out MOVwf trisc Bcff3,5 MOVlw10100000b Btfsc sign, read_b MOVlw10100001b MOVwf 6dh MOVlw 6dh MOVwff4 W_byte Bsff3,5 ;bsf rc, sda MOVlwsda_out MOVwf trisc Bcff3,5 MOVlw 08h MOVwftemp2 Bit_loop Nop Rlff0 Bcf rc, scl Btfssf3,0 Goto^+3 Bsf rc, sda Goto^+2 Bcf rc, sda Nop Bsf rc, scl Decfsz temp2 Gotobit_loop Nop Bcf rc, scl Bsff3,5 ;bcf rc, sda MOVlwsda_in MOVwf trisc Bcff3,5 Bsf rc, scl Nop Btfsc rc, sda Gotom_start0 Bcf rc, scl Return ; W_stop M_stop Bcf rc, sda Bsff3,5 ;bsf rc, sda MOVlwsda_out MOVwf trisc Bcff3,5 Nop Bsf rc, scl Nop Bsf rc, sda Nop Bcf rc, scl Return ; Rd_bytes Nop Rnxtb Bcf rc, scl Bsff3,5 ;bcf rc, sda MOVlwsda_in MOVwf trisc Bcff3,5 MOVlw 08h MOVwftemp2 Rnx Bcf rc, scl Nop Bcff3,0 Btfsc rc, sda Bsff3,0 Rlff0 Bsf rc, scl Nop Decfsz temp2 Gotonx Incff4,1 Bsff3,5 ;bsf rc, sda MOVlwsda_out MOVwf trisc Bcff3,5 Bcf rc, scl Decfsz temp4 Gotot_ackg R_stop Gotom_stop T_ackg Bcf rc, sda Nop Bsf rc, scl Nop Gotonnxtb ;----------------------------- Delay_1ms MOVlw .1 MOVwftemp6 delay_publIC MOVlw .223 MOVwftemp7 Public_2 Crrwdt Decfsz temp7,1 Gotopublic_2 Decfsz temp6,1 Gotodelay_public Return ;----------------------------- ;----------------------------- ; The main program area ;----------------------------- Main_program Bsff3,5 MOVlw 0fh MOVwf 81h MOVlwsda_in MOVwf trisc Bcff3,5; bank0 Reset_delay MOVlw 20h MOVwff4 Next Clrff0 Incff4,1 MOVlw 80h; clr 20h--7fh ram Crrz Xorwff4,w Skpz Gotonext ;----------------------- Clrf intcon Bsff3,5 MOVlw 0fh MOVwf 81h Bcff3,5; bank0 ; ;--------------------------- Read_eeprom_repair Bcf rc, eneep Calldelay_1ms ; Callack_check MOVf address, 0 MOVwf 6eh Incff4 Callw_byte Bsfsign, read_b Callack_check Bcfsign, read_b MOVlw 20h MOVwff4 MOVlw .8 MOVwftemp4 Callrd_bytes Nop Nop Nop Nop Calldelay_1ms Bsf rc, eneep ; Write_eeprom_repair Bcf rc, eneep Calldelay_1ms ; Callack_check MOVf address, 0 MOVwf 6eh Incff4 Callw_byte MOVlw 40h MOVwff4 MOVlw .8 MOVwftemp4 Write_option Callw_byte Incff4,1 Decfsz temp4 Gotowrite_option Callw_stop Nop Nop Nop Nop Calldelay_1ms Bsf rc, eneep ; Loop Gotoloop End

Dell Adapter

Laptop power adapter charger for Dell:

Laptop Model Adapter Output
Latitude E5400 E5410 E5500 E5510 19.5v 4.62a, 7450
Studio XPS 16 (1645)1640 1645 1647 19.5v 4.62a, 7450
Studio XPS M1645 M1647 19.5v 4.62a, 7450
XPS 14 15 17 L501x L502x L702x L702x 19.5v 4.62a, 7450
Inspiron 1464 1564 1764 19.5v 4.62a, 7450
Inspiron 1525 1440 1526 19.5v 3.34a, 7450
Precision M4600 M6600 19.5v 6.7a, 7450
Inspiron N5050 N4010 N5110 19.5v 3.34a, 7450
Inspiron 14Z-N411Z 13Z N311Z 19.5v 4.62a, 7450
Inspiron 1545 19.5v 3.34a, 7450
Latitude E5420 E5530 E5430 E6420 19.5v 4.62a, 7450
Inspiron 1440 1525 1526 1545 1750 19.5v 3.34a, Octagon tip
Inspiron 1300 B120 B130 19v 3.16a/3.42, 5525
Inspiron 1525 1526 1545 19.5v 3.34a, 7450
Studio 1440 1440n 1440z 14z 14zn 19.5v 3.34a, 7450
Latitude E4300 E4310 19.5v 4.62a, 7450
Inspiron 13Z 13ZD 13ZR M301 M301z M301ZD M301ZR N301 19.5v 3.34a, 7450
Inspiron N301Z N301ZD N301ZR 19.5v 3.34a, 7450
Studio 1535 1536 1555 1557 1558 19.5v 4.62a, 7450
Latitude E5420 E5520 E6430 E6530 E6420 E6520 19.5v 4.62a, 7450
Inspiron Mini 10 10v 1010 1010n 1010v 1011 1011n 1011v 19v 1.58a, 5517
Inspiron 14V 14VR M4010 N4020 N4030 19.5v 4.62a, 7450
Inspiron N4110 N5110 N7110 M5010 19.5v 3.34a, 7450
630M 640M E1405 19.5v 4.62a, 7450
Inspiron 15-3521 17-3721 19.5v 3.34a, 7450
Latitude 120L 19.5v 3.34a, 7450
Vostro 1710 1710n 1720 1720n 19.5v 4.62a, 7450
Vostro 1500 1700 Inspiron 1520 1521 1720 19.5v 4.62a, 7450
Vostro 1400 1420 PP26L 19.5v 3.34a, 7450
Latitude D410 19.5v 3.34a, 7450
Inspiron 1120, 1121, M101 19.5v 3.34a, 7450
Inspiron Mini 1012 1018 19v 1.58a, 5517


Our service:

Stable output and high charging efficiency.

Elegant outlook design as original one, touch smoothly and comfortable.

Original charger is good, but as a replacement, our product has more reasonable price when your original charger is broken.

And, the market of the replacement adapters becomes bigger and bigger. People would rather buy a copy one then the original because of the price.

But at the same time, people worry about that they will buy something defective. So the problem comes, how to buy a good quality one with a good price?

As a professional power adapter manufacturer, we have excellent R&D team, skilled staffs and responsible after-sale service. All your benefits can be under protected after you buy products for our company.

Our certificates :ISO9001:2008 & ISO14001:2004 , CCC , CE , FCC , ROHS.

All our products has 1 year warranty. In other words, if you get the dad products which are not damaged physically from us in one year, we will replace you the new one or the whole bulk order.

Mini Charger For Dell,Big Connector Adapter,45W Power Adapter,Dell Computer Adapter

Shenzhen Waweis Technology Co., Ltd. , https://www.waweis.com

This entry was posted in on