FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    89C51 Programmer, 89c51 Programmer

     

    89C51 Programmer, 89c51 Programmer Keywords: AT89C51, programmer circuit diagram 89C51 chip programmer, picture is small, look at it, with procedures program: #include "at89x52.h" #include "stdio.h" #include "intrins.h" #include "ctype.h" SBIT RDY = P3 ^ 2; SBIT VPP = P3 ^ 3; SBIT P26 = P3 ^ 4; SBIT P27 = P3 ^ 5; SBIT P36 = P3 ^ 6; SBIT P37 = P3 ^ 7; Sbit PROG = P2 ^ 7; Void init_serial () {SCON = 0x50; / * mode 1 * / tmod = 0x20; TH1 = 0xFD; PCON = 0x80; / * 38400bps * / TR1 = 1; / * load TMR1 * / Ti = 1; es = 1; } Void init_pro () {p26 = 0; p27 = 0; p36 = 0; p37 = 0; VPP = 1; prOG = 1;} Void Sendbyte (unsigned char da) / * send a byte * / {while (! ti); ti = 0; sbuf = da;} Unsigned char INTTOASCII (unsigned char a) / * change Dec to ascii hex code * / {ix (A<10) RETURN A + 48; IF (A>9) Return A + 55;} Unsigned int getadr () / * get 5 DITI DEC ADR * / {UNSIGNED CHAR I, A [5]; for (i = 0; I<5; i ++) {while (! ri); ri = 0; a [i ] = SBUF-48;} return a [0] * 10000 + a [1] * 1000 + a [2] * 100 + a [3] * 10 + a [4];} Unsigned char getdata () / * get 2 DITI HEX DATA * / {Unsigned Char D1, D2; While (! ri); ri = 0; D1 = TOINT (SBUF); While (! ri); ri = 0; d2 = Toint (SBUF); RETURN D1 * 16 + D2;} Unsigned INT DETCHIP (INT ADR) {P0 = 0xFF; P1 = ADR% 256; P2 = ADR / 256; init_Pro (); _nop _(); _nop _(); _NOP_(); _nop_(); _NOP_(); / * delay 10 US * / _NOP _(); _nop _(); _nop _(); _nop _(); _nop _(); return p0;} void read () {unsigned int ADR , MaxAdr; Uns; P0 = 0xFF; MaxAdr = getAdr (); for (ADR = 0; ADR {P1 = ADR% 256; P2 = ADR / 256; P26 = 0; p27 = 0; p36 = 1 P37 = 1; VPP = 1; prOG = 1; h = INTTOASCII (P0 / 16); SendByte (h); l = INTTOASCII (P0% 16); sendbyte (L);} init_Pro ();} Unsigned int today {unsigned int adj, counter = 0; p0 = 0xff; for (ADR = 0; ADR {P1 = ADR% 256; P2 = ADR / 256; P26 = 0; p27 = 0; p36 = 1; p37 = 1; VPP = 1; prog = 1; _nop _(); _nop _(); _nop _(); _nop _(); _nop_(); / * delay 10 us * / _nop _(); _nop_(); _nop _(); _NOP _(); _NOP_(); if (p0! = 0xff) Counter ++;} init_Pro (); return counter;} Unsigned Char ERASE (unsigned int NN, unsigned int p) {unsigned INT i; p0 = 0xff; p26 = 1; p27 = 0; p36 = 0; p37 = 0; VPP = 0; prOG = 1; for (i = 0 i<50000; i ++) _nop _(); switch (p) {case 0: prOg = 0; prog = 1; Break; case 1: prog = 0; _nop_(); prog = 1; break; case 2: prOg = 0; _nop_(); _NOP_(); prog = 1; Break; Case 3: prog = 0; _nop _(); _nop _(); _nop_(); prog = 1; breaf; casser 4: prog = 0; _nop_(); _NOP _(); _NOP_(); prog = 1; Break; Case 5: prog = 0; _nop _(); _nop _(); _nop_(); _nop _(); _nop_(); PROG = 1; Break; case 6: prog = 0; _nop _(); _nop _(); _nop _(); _nop _(); _nop _(); _nop_(); prOg = 1; break; cas 7: prog = 0; _NOP _(); _nop _(); _nop _(); _nop _(); _nop _(); _nop _(); _nop_(); prog = 1; break; casser 8: prog = 0; _nop _(); _nop _(); _nop_(); _nop _(); _nop _(); _nop _(); _nop _(); _NOP_(); prog = 1; break; default: prog = 0; for (i = 0; i prog = 1; Break;} _nop_(); _nop _(); _nop _(); _nop _(); _nop _(); _nop _(); _nop _(); _nop _(); vpp = 1; for (i = 0; IIF (Test (nn) == 0 Return 's'; Else Return 'f';} Unsigned char Write () {Unsigned int ADR, D, I; P26 = 0; P27 = 1; P36 = 1; P37 = 1; VPP = 0; prOG = 1; for (i = 0; I<4000; i ++) _nop _(); adr = getAdr (); d = getdata (); while (1) {if (ADR>50000) Break; p1 = ADR% 256; P2 = (ADR / 256) | 0x80; p0 = d; Ti = 0; SBUF = 's'; prog = 0; _nop _(); _NOP _(); _NOP_(); prog = 1; adr = getAdr (); d = getData (); while (! Rdy);} init_pro ); return 'f';} Unsigned char Lock (unsigned char level) {unsigned int i; vpp = 0; if (level == 1) {P26 = 1; p27 = 1; p36 = 1; p37 = 1;} if (level == 2) { P26 = 1; p27 = 1; p36 = 0; p37 = 0;} if (level == 3) {p26 = 1; p27 = 0; p36 = 1; p37 = 0;} for (i = 0; i. 1881.4000; i ++) _nop _(); prop = 1; _nop _(); _nop _(); _nop _(); _nop _(); _nop_(); / * delay 10 us * / _nop _(); _nop _(); _NOP_() _nop _(); _NOP _(); prog = 0; _nop _(); _nop _(); _nop _(); _nop _(); _nop_(); / * delay 10 us * / _nop _(); _nop _(); _nop_(); _NOP_); _NOP _(); _NOP _(); prog = 1; _nop _(); _nop _(); _nop _(); _nop _(); _nop _(); while (); init_pro (); return 'o';} Void main () {unsigned int Data ADR, L, DX; init_pro (); init_serial (); while (1) {init_pro (); scanf ("% c", & c); switch (c) {CASE 'C': Printf ("% C", 'o'); Break; Case 'D': Scanf ("% X", & ADR); Printf ("% X", Detchip (ADR)); Break; Case 'T': Scanf ("% U", & DX); Printf ("% U", Test (DX)); Break; Case 'R': read (); Break; Case 'E': Scanf ("% U,% u ", & arm, & dx; printf ("% C ", ERASE (ADR, DX)); Break; Case 'W': Printf ("% C ", WRITE ()); Break; Case 'L ': Scanf ("% U", & L); Printf ("% C", LOCK (L)); Break; Case' h ': Printf ("********* ER6Y Programmer Help Window * ********** \ n "); Break; default: Break;}}} Schematic:, read full text

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us