caramoan tour package

caramoan tour package

Author Topic: The 8051 Core MCU - STARTER  (Read 16215 times)

Offline marcelino

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6016
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: The 8051 Core MCU - STARTER
« Reply #40 on: July 27, 2008, 12:26:34 PM »
oo nga... may C din. since yung content ng manual and exercises ni dcore ay assembly, eto na ang pagkakataon ko mag-aral uli ng assembly.
nakapag-aral ako actually ng assembly kaso sobrang kulang. walang application.
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Philippine Electronics Forum

Re: The 8051 Core MCU - STARTER
« Reply #40 on: July 27, 2008, 12:26:34 PM »

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10728
  • Pogi/Ganda Points: 632
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: The 8051 Core MCU - STARTER
« Reply #41 on: July 27, 2008, 12:28:41 PM »
konti lang assembly codes sa 8051. gusto ko rin mag-aral ulit ng assembly. minsan kasi gumagamit din ako ng assembly na part ng C codes ko, pero hindi pa ako gumagawa ng pure assembly. ;D
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Philippine Electronics Forum

Re: The 8051 Core MCU - STARTER
« Reply #41 on: July 27, 2008, 12:28:41 PM »

Offline marcelino

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6016
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: The 8051 Core MCU - STARTER
« Reply #42 on: July 27, 2008, 12:34:57 PM »
konti lang ba? buti naman... ang importante masanay nga sa assembly. pagkatapos nun, siguradong magiging madali na ang pag-gamit ng assembly sa ibang MCU. given the fact na mas optimized ang assembly, e di dapat talgang alam natin to.

at the same time, to beginners, like me, we can explore 8051 with dcore's kit.
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Philippine Electronics Forum

Re: The 8051 Core MCU - STARTER
« Reply #42 on: July 27, 2008, 12:34:57 PM »

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10728
  • Pogi/Ganda Points: 632
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: The 8051 Core MCU - STARTER
« Reply #43 on: July 27, 2008, 12:45:44 PM »
256 lahat yung OPCODEs pero maraming variations na yun ng ibang commands.

typical ASM codes lang, AND, OR, XOR, ComPLement, Rotate Left/Right, ADD, SUBtract, MULtiply, DIVide, MOV (MOVX kung may external), SWAP, eXCHange, PUSH, POP, CLeaR, SET, tapos conditional and branch instructions na.
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Philippine Electronics Forum

Re: The 8051 Core MCU - STARTER
« Reply #43 on: July 27, 2008, 12:45:44 PM »

Offline Dandy

  • Lead Acid Battery
  • *******
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: The 8051 Core MCU - STARTER
« Reply #44 on: July 27, 2008, 01:55:16 PM »
Maliban sa C at Assembly, mayroon din BASIC ang 8051 IDE, PASCAL at saka Ladderwork (Graphical Base Language -- like LAB VIEW),  PASCAL and LadderWork hindi masyado popular.

Assembly is "shocking" - hinde Love at first sight.  However, Kagaya nga ng sinabi ni dcore,  its the way to start to learn the 8051 architecture which is totoo naman.   If you started with higher language like C, less ang involvement mo sa internal processing at mas concern ka sa Inout/ Output.

In most case, ginagamit ang assembly kung may concern sa memory (limited Flash ROM mo), kasi mas less memory eater ang Assembly kesa sa "C",  mas tendious long writing and debugging naman ang Assembly.

---------------------------------------------------------------------------
Well, if you guys can help us in the original idea of "ABCD MCU educ. scheme" by dcore, we appreciate so much.

Note:
A - Assembly
B - BASIC
C -  C language
D - Drawing (daw hehehe :  Graphical Base Language like Ladderwork)

Ang ginagawa na Function ng Assembly,  like my post program above, gagawin din ng BASIC, C Language at Drawing (LadderWork).....  dahil isa ang function na ginagawa with different language, madali talaga matutu. 

Philippine Electronics Forum

Re: The 8051 Core MCU - STARTER
« Reply #44 on: July 27, 2008, 01:55:16 PM »

Offline marcelino

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6016
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: The 8051 Core MCU - STARTER
« Reply #45 on: July 27, 2008, 02:02:33 PM »
go ABCD...! hehehe
kaso, mali ang nangyari saakin, i tasted A, skipped B and getting serious with C! hehehe
after my project, i'll go back to A! promise...! ;D
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Offline toasted siopao

  • She loves me, she loves me not, she loves me...
  • Global Moderator
  • Gas Turbine
  • *****
  • Posts: 2574
  • Pogi/Ganda Points: 107
  • Gender: Female
    • TeknoBlogger
Re: The 8051 Core MCU - STARTER
« Reply #46 on: July 27, 2008, 02:05:10 PM »
256 lahat yung OPCODEs pero maraming variations na yun ng ibang commands.

typical ASM codes lang, AND, OR, XOR, ComPLement, Rotate Left/Right, ADD, SUBtract, MULtiply, DIVide, MOV (MOVX kung may external), SWAP, eXCHange, PUSH, POP, CLeaR, SET, tapos conditional and branch instructions na.

Ang dali magcode sa assembly, ang problema sa assembly ay ang pagdebug.

Offline kaori

  • CR2032 Battery
  • **
  • Posts: 7
  • Pogi/Ganda Points: 0
Re: The 8051 Core MCU - STARTER
« Reply #47 on: July 29, 2008, 01:40:10 PM »
Ang dali magcode sa assembly, ang problema sa assembly ay ang pagdebug.
MAY MGA ALAM PO BAKAYONG MAGAGANDANG REFERENCE NG ASSEMBLY?

Offline DCore

  • Size AAA Battery
  • ***
  • Posts: 76
  • Pogi/Ganda Points: 6
  • Gender: Male
Re: The 8051 Core MCU - STARTER
« Reply #48 on: July 30, 2008, 07:03:18 PM »
Ehem, naku, kulang tulog lang iyan, "Drawing" ahah, kung sinabi mo na lang na Graphical Base Language (Ladderwork) kumpara sa Text Base Language.  Nagiging Analog Core (Acore) ka na ata, di na Digital Core (Dcore).

Check Ladderwork by microSHADOW Research - Italy.  They updated to include the 8051 core and some ATMEL processor.  There is a freeware version for trial.

Puwede ba joke?  masyado siryuso usapan:
Dcol, ikaw uwi na, iwan mo Lab View ploglam, ikaw kanina  pa antay  'LOVE babe' mo, hehehehe

Ako, mayloon ABCD idea din, ako talaga oliginal nito.   ABCD - Ang  Bebot na Chinese ni Dcore, hahahaha,  ABCD iyan tutuo ibig sabihin, tlue mining.

Ako basa iyo mga post, malami gusto matuto ploglamming na sabi Dcore, pelo dapat iyo malaman ang ABCD.  Ito tlue mining kung ikaw paniwala kay Dcore.  ABCD - Ang Bayad sa Course ni Dcore, ito wala lible heheheehe

Ako ha, kayo usapan ATMEL8051, INTEL8051, Philips8051- ako, gusto usapan USD8,051  makaling na budyet papunta Bolakay saka makanda sa Cebu Plantation Bay.  Ako sila na ulo kagagawa ng ABCD ni Dcol, ako bigla tumanda, ako gusto muna lelax. 


Ako bigay tip, Ako natutu ploglam ABCD ni Dcol, ito:
'----------------------------------------------------------
' PROG_01                First Program
'----------------------------------------------------------
'Start of Program:   'Program Start Here
   P1 = 255            'Set Port 1 P1.1 ~ P1.7 to Logic 1
End                      'End of Program


Murder na iyan bro!!!!  Joke lang po iyan ha.

Kung tapusin mo na lang kaya ginagawa mo, di ma naman daw magawa ang AVR programmer hehehehe saka upgrade ng AT89LP2052?  Iyan na lang kaya i-post mo.

Post ka ng post ng Program mo hehehe, may mali naman.

_________________________
There's nothing like EAFF (easy, affordable, fast & fun)

Offline DCore

  • Size AAA Battery
  • ***
  • Posts: 76
  • Pogi/Ganda Points: 6
  • Gender: Male
Re: The 8051 Core MCU - STARTER
« Reply #49 on: July 30, 2008, 08:07:11 PM »
medyo magulo nga talaga... paki explain pa po ng konti.
pero maganda nga... at since, nagC kaagad ako sa PIC. marahil ito ang pagkakataon na mapag-aralan ko ang assembly. nwei, ang importante ay ang masanay ako.


Sir, alin po ba magulo,  iyong Alexan/DOST o iyong Program na naka post?
Iyong Alexan at saka DOST, mayroon daw sila sariling R&D, kaya iyong offer namin since 2004~2008 sa kanila were not welcome.  We have gone through DECS, TESDA and CHED as well kasi nababasa namin noon na mayroon support ang government sa mga individual person, company and similar institution about boosting the technical education here in RP, seriously we did try na mag-avail sana and to be guided iyong tamang ways.  Well,  we'll do it again by 2008 4rth quater or by 2009.

Iyong naka post na program naman, its one of the sample Program in the Trainer Kit :  STARTER MCU-EB8051-"2" Trainer Kit.   Ang ginagawa lang ng program ay to "create a running lights".

Mayroon 8 LEDs na nakakabit sa AT89S51, mula Pin 1 (P1.0)  hanggang Pin 8 (P1.7).  Ang gagawin ng program ay paiilawin niya ang LED alternate :

Pattern 1 : 10101010   ---> LED_7, LED_5, LED_3, LED_1 =  No LIGHT
                                      LED_6, LED_4, LED_2, LED_0  = will Light

Pattern 2  : 01010101  ---->  LED_7, LED_5, LED_3, LED_1 =  will LIGHT
                                         LED_6, LED_4, LED_2, LED_0  = No Light

Kung alternate ang Pattern 1 at saka pattern 2 endlessly, with about 500msec delay between pattern, ang kalalabasan ng 8 LED ay parang running lights.

Ang Instruction na :  MOV     A, #10101010B    ay byte command para i-load ang pattern 1  sa Accumulator (A) :   A = 10101010.    Ginamit ang Binary Notation kasi, mas madaling maintindihan ang sequence ng LED.   ZERO means LIGHT LED,  "1"  means NO LIGHT LED --->  current sink driving the LED :  Ang anode ng LED ay naka connect sa +5V via a 560 ohms limiting resistor,  ang cathode ay nakaconnect sa MCU port, parang ginagawa ng MCU ay i-GND lang ang cathode para umilaw :  zero =  GND,  "1"=V+, kaya para umilaw ang LED, dapat ang logic ay zero (para GND).

Ang instruction na :  MOV     LEDOUT,A    ipapasa ngayon ang laman ng "A"  sa LEDOUT,  at doon sa declaration ang LEDOUT ay  Port 1 (P1).  DI kasi puwede na gawin  MOV P1 = A sa Assembly na ito,  kagaya ng CHESS, may kanya kanyang movement ang mga bishop, King and Queen, ganun din ang mga register and ports, may kani kanilang movement sa memory.   Oks, so ang laman ng P1 ngayon ay P1 = 10101010.   At dito, iilaw na ang mga LED sa pattern 1.

Ang instruction na :   CALL    DELAY, magkaroon ng about 500msec delay para makikita na iilaw ang mga LED.  So kung about 500msec ang delay mo iyan din ang time kung gaano katagal iilaw ang mga LED.

(same lang po ang pattern 2).

Iyong DELAY--- ay subroutine po iyan, kung baga "Palipas Oras".  Para magkaroon ng delay, ang program ay paikot-ikot sa Register R6 at saka R7.  Ang R6 ay may value na 255 decimal, mag-decrement ito hanngang zero,  tapos uulitin iyan 100 times (R7=100).

Ang Register R6 ay matatagpuan sa location memory address 006H   (bank 0) at ang Register R7 naman ay matatagpuan sa memory address 007H (bank 0).

Itama ko lang typo "niya" :

DELAY:                                 
                MOV     R7,#100             ;Set R7 to loop 100 times
OLOOP:      MOV     R6,#255             ;Set R6 to 255
ILOOP:       DJNZ    R6, ILOOP           ;Decrement R6 by 1, if R6 is not equal
                                                   ;to "0" then go to label ILOOP
                DJNZ    R7,OLOOP           ;If R6 loops 255 times, decrement R7 by
                                                   ;1 and if R7 is equal to 0, it will exit
                                                   ;DELAY and go back to the Main
                                                   ;Program. If R7 is not equal to 0, then
                                                   ;ILOOP
                RET                              ;Return to the Main Program

I hope Sir, nasundan niyo po ang logic ng program.

Of course, sa higher language, napakadali na gawin iyan, di po ba?   Gaya ng advice sa akin noon,  magsimula ka sa Assembly (kung di ka naman talaga nagmamadali and you are really like to study the Architecture),  kasi, using Assembly instruction, you are required to know the "memory map", kasi dito sa memory map mo lang paiikutin (manipulate) ang iyong data.   As I often described,  parang chess board ang memory map ng Intel 8051,  may mga movement ang bawat chess character, ganun din sa MCU, may movement ang bawat registers.

In the accompanying book - ang memory map ng Intel 8051 was compared to a Floor plan ng House,  and then Registers are compared to a cabinet filling books,  in the cabinet there is a rule to put the book,  you can put the book one by one (bit manipulation)  and also put the book 8 at a time (byte manipulations).  It was explained in a simple way para madali ma-intindihan ---kopya lang iyan sa coding ng Resistor  (diba, may coding din tayo sa Resistors in a "maniac definition"   like,  Bad Boy Rape Our Young Girl But Violy Give it Willingly, instead na sasa bihin mo  Black, Bowrn, Red, Orange......

I really hope we can offer the :  EAFF - Easy, Affordable Fast and Fun ways of Learning MCU.   
_________________________
There's nothing like EAFF (easy, affordable, fast & fun)

Offline timelord

  • LR44 Battery
  • *
  • Posts: 1
  • Pogi/Ganda Points: 0
Re: The 8051 Core MCU - STARTER
« Reply #50 on: July 31, 2008, 12:25:40 AM »
Mr. DCore intresado ako sa 8051 trainer mo magkano ba ito at saan ako makakabili taga makati ako. Pwedeng paki reply lang sa email ko  kung hindi pwede dito i post ang price. Charmces@yahoo.com

Offline DCore

  • Size AAA Battery
  • ***
  • Posts: 76
  • Pogi/Ganda Points: 6
  • Gender: Male
Re: The 8051 Core MCU - STARTER
« Reply #51 on: August 01, 2008, 03:17:54 AM »
Sir, as requested - send the info to your email.  Please tell me the package you would like to avail.

+++++++++++++++++++++ ADD  INFO ++++++++++++++++++++++++++++

What is this?   89C51

8 = 8 bit Architecture
9 = Flash Memory
C = Cmos technology  Conventional Programming
51 = MCS 51 with 4K Flash Memory

If it is AT89C51  it means :  a MCS51 derivative 8 bit MCU manufactured by ATMEL, CMOS technology with 4K bytes of Flash memory, conventional programming

AT89C52 =  ATMEL 8 bit MCU, with 8Kbytes Flash Memory and CMOS technology conventional programming

AT89S52 =  ATMEL 8 bit MCU, with 8Kbytes Flash Memory with ISP Programming

What is Conventional ang ISP Programming?
With AT89C51, the MCU is taken out from the circuit and program using a Programmer.  After programmed it, you an return it back into the circuit.

With AT89S51, it allow the MCU to be programmed while it is connected into the circuit (ISP = In System Programming) using SPI.   You will need an ISP programmer.

In the Trainer Kit - the Target board as its original design with AT89C51, it cannot programmed on the board.  With the advent of ISP in 2004~05 with AT89S51,  I came up with Smart-"H" ISP Module which allow the AT89S51 to be directly programmed while it is connected to the Trainer Kit.  Rapid download / upload of firmware is possible.

AT89C1051?
The AT89C1051 is 20 pins version, the younger brother of AT89S51 (40 pins).

AT89C1051 = 1K Flash ROM, conventional programming
AT89C2051 = 2K Flash ROM, conventional programming
AT89C4051 = 4K Flash ROM, conventional programming

AT89S2051 = 2K Flash ROM, ISP Programming
AT89S4051 = 4K Flash ROM, ISP Programming

All the above MCU are compatible with the "Original 8051 Core".  These MCUs is used in low pin count application project, yet they equiped with the same power as the 40 pins (with UART), the good thing is - they are cheap to be used and implement.

The AT89LP2052/ AT89LP4052 - improved version of AT89S2051/4051, ISP capabe and achieve performance throughput equal or better than the 8 bit AVR.   AT 20 MHz, it is 20 MIPs performance.
_________________________
There's nothing like EAFF (easy, affordable, fast & fun)

Offline aze

  • Size C Battery
  • *****
  • Posts: 187
  • Pogi/Ganda Points: 14
  • Gender: Male
Re: The 8051 Core MCU - STARTER
« Reply #52 on: August 02, 2008, 04:56:26 PM »
 ;D sir pwede pm mu din ako kng mgkanu? student dn po ako...  ;D

Offline 0b00000111

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6129
  • Pogi/Ganda Points: 398
  • There is no delight in owning anything unshared.
Re: The 8051 Core MCU - STARTER
« Reply #53 on: August 02, 2008, 04:59:17 PM »
Ang dali magcode sa assembly, ang problema sa assembly ay ang pagdebug.

isa ring possible problem is yung readability pag nagbasa ka ng code ng iba ;D ;D ;D nahihilo ako pag kung saan saan ako dinadala ng mga goto ;D ;D ;D
E-Gizmo Mechatronix Central: www.e-gizmo.com

Tel #: (63)(2) 536-3378
Globe +63915-973-7691
Smart +63921-779-0748

Location Map

YM: julie.egizmo  aka Born2BeWired  ;D

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: The 8051 Core MCU - STARTER
« Reply #54 on: August 02, 2008, 06:14:55 PM »
"the devil is in the assembly details" ;D
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline 0b00000111

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6129
  • Pogi/Ganda Points: 398
  • There is no delight in owning anything unshared.
Re: The 8051 Core MCU - STARTER
« Reply #55 on: August 02, 2008, 06:17:39 PM »
bagong quote yan ah ;D ;D ;D
E-Gizmo Mechatronix Central: www.e-gizmo.com

Tel #: (63)(2) 536-3378
Globe +63915-973-7691
Smart +63921-779-0748

Location Map

YM: julie.egizmo  aka Born2BeWired  ;D

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: The 8051 Core MCU - STARTER
« Reply #56 on: August 02, 2008, 06:32:16 PM »
modified quote hehe ;D
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Offline DCore

  • Size AAA Battery
  • ***
  • Posts: 76
  • Pogi/Ganda Points: 6
  • Gender: Male
Re: The 8051 Core MCU - STARTER
« Reply #57 on: August 03, 2008, 03:13:12 AM »
isa ring possible problem is yung readability pag nagbasa ka ng code ng iba ;D ;D ;D nahihilo ako pag kung saan saan ako dinadala ng mga goto ;D ;D ;D

Check if you can follow the simple Assembly program posted.  In our case,  we put heavy comment doon sa mga instructions, possibly explaining how "these" instruction works.

In some of Trainer book,  gumamit na nga ng tagalog  na comment sa program para lalu daw ma-intindihan, kaso naging 'badoy' daw ang labas nito sa mga instructor at professor, asking the author to changed to English.

Pero bilid ako sa mga bihasa sa assembly - kasi kaya nila mag-read and interpret ng code (di ko rin kaya)  kahit na wala comment, at lalu na mga twink and kint nila,  mga sinasabi nilang 'Assembly magic' kung pinagkakasya nila ng program sa limited memory, 1K o 2K, sa isang product -- gaya halimbawa ng mga FRS o walkie Talkie.    For sure, high level language would not suit dahil sa limited memory.
_________________________
There's nothing like EAFF (easy, affordable, fast & fun)

Offline Dandy

  • Lead Acid Battery
  • *******
  • Posts: 726
  • Pogi/Ganda Points: 31
Re: The 8051 Core MCU - STARTER
« Reply #58 on: August 05, 2008, 10:21:07 AM »
When a MCU is made up of the Intel 8051 core, it is generally refer to as 8051 core or MCS51 (in some data sheet it is advertise as Compatible with the MCS51).

Why it is not called 8052?

Naka-ugalian na daw kasi na tawagin na 8051, kahit na iyong device ay referring na sa 8052 na modernized Memory.  Ang 8052 ay enhanced version ng 8051 na nagdagdag ng 128 bytes sa Internal memory (RAM).  In some device, mayroon na 3rd Timer (TIMER 2).  Now a days, enhanced version pa ng 8052 dahil single pulse ng crystal equal sa 1 cycle na.

Almost 30 years na, the 8051/8052 are interchangeably called.  Wala pa naman 8053, hehehehe.

Bakit naman may tinatawag na MCU at mayroon pa EMBEDDED MCU o kaya EMBEDDED CONTROLLER?

Kapag ba maraming function ng MCU, kagaya nito :

               ADE7169:
               Single-Phase Energy Measurement IC
               with 8052 MCU, RTC, and LCD Driver

tinatawag lang ba itong MCU, embedded MCU o embedded Controller?

Kapag tawag mo lang ay MCU, parang simple na MCU lang, pero tinawag na Embedded MCU o embedded controller, perception ay napakagaling na MCU.   

Offline paranz

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: The 8051 Core MCU - STARTER
« Reply #59 on: August 05, 2008, 11:06:13 AM »
^ nice info. More please ;)
PIC16 Programming Tutorial using MPLAB and Hi-Tech C
www.rapidsignalph.com/tutorials/pic16-tutorials

Arduino & gizDuino Tutorials
www.rapidsignalph.com/tutorials/arduino-tutorials

Philippine Electronics Forum

Re: The 8051 Core MCU - STARTER
« Reply #59 on: August 05, 2008, 11:06:13 AM »

 

Privacy Policy

Contact Us: elabph@yahoo.com