The Philippine Electronics and Technology Forum
February 09, 2012, 06:56:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  

Pages: 1 2 [3] 4 5   Go Down
  Print  
Author Topic: The 8051 Core MCU - STARTER  (Read 13801 times)
marcelino
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 247
Offline Offline

Posts: 5861


...keep moving forward! - Robinson's


« 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.
Logged

"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"
The Philippine Electronics and Technology Forum
« Reply #40 on: July 27, 2008, 12:26:34 PM »

 Logged
rdpzycho
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 465
Offline Offline

Gender: Male
Posts: 9155


Perfection is an Illusion


WWW
« 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. Grin
Logged

‎"Keep on starting, and finishing will take care of itself."

- Neil Fiore
marcelino
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 247
Offline Offline

Posts: 5861


...keep moving forward! - Robinson's


« 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.
Logged

"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"
rdpzycho
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 465
Offline Offline

Gender: Male
Posts: 9155


Perfection is an Illusion


WWW
« 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.
Logged

‎"Keep on starting, and finishing will take care of itself."

- Neil Fiore
Dandy
Size D Battery
******

Pogi/Ganda Points: 11
Offline Offline

Posts: 418


« 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. 
Logged
marcelino
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 247
Offline Offline

Posts: 5861


...keep moving forward! - Robinson's


« 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...! Grin
Logged

"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"
toasted siopao
She loves me, she loves me not, she loves me...
Global Moderator
Diesel Generator
*****

Pogi/Ganda Points: 80
Offline Offline

Gender: Female
Posts: 1710



« 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.
Logged

Enjoying the Australian outback.
kaori
CR2032 Battery
**

Pogi/Ganda Points: 0
Offline Offline

Posts: 7


« 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?
Logged
DCore
Size AAA Battery
***

Pogi/Ganda Points: 3
Offline Offline

Gender: Male
Posts: 70


« 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.

Logged

_________________________
There's nothing like EAFF (easy, affordable, fast & fun)
DCore
Size AAA Battery
***

Pogi/Ganda Points: 3
Offline Offline

Gender: Male
Posts: 70


« 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.   
Logged

_________________________
There's nothing like EAFF (easy, affordable, fast & fun)
timelord
LR44 Battery
*

Pogi/Ganda Points: 0
Offline Offline

Posts: 1


« 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
Logged
DCore
Size AAA Battery
***

Pogi/Ganda Points: 3
Offline Offline

Gender: Male
Posts: 70


« 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.
Logged

_________________________
There's nothing like EAFF (easy, affordable, fast & fun)
aze
Size C Battery
*****

Pogi/Ganda Points: 14
Online Online

Gender: Male
Posts: 181



« Reply #52 on: August 02, 2008, 04:56:26 PM »

 Grin sir pwede pm mu din ako kng mgkanu? student dn po ako...  Grin
Logged
7_SeVeN_7
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 380
Offline Offline

Posts: 5954


There is no delight in owning anything unshared.


« 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 Grin Grin Grin nahihilo ako pag kung saan saan ako dinadala ng mga goto Grin Grin Grin
Logged

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  Grin
paranz
Technical People
Nuclear Reactor
*****

Pogi/Ganda Points: 167
Offline Offline

Gender: Male
Posts: 4511


1/4W resistor specialist


« Reply #54 on: August 02, 2008, 06:14:55 PM »

"the devil is in the assembly details" Grin
Logged
7_SeVeN_7
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 380
Offline Offline

Posts: 5954


There is no delight in owning anything unshared.


« Reply #55 on: August 02, 2008, 06:17:39 PM »

bagong quote yan ah Grin Grin Grin
Logged

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  Grin
paranz
Technical People
Nuclear Reactor
*****

Pogi/Ganda Points: 167
Offline Offline

Gender: Male
Posts: 4511


1/4W resistor specialist


« Reply #56 on: August 02, 2008, 06:32:16 PM »

modified quote hehe Grin
Logged
DCore
Size AAA Battery
***

Pogi/Ganda Points: 3
Offline Offline

Gender: Male
Posts: 70


« Reply #57 on: August 03, 2008, 03:13:12 AM »

isa ring possible problem is yung readability pag nagbasa ka ng code ng iba Grin Grin Grin nahihilo ako pag kung saan saan ako dinadala ng mga goto Grin Grin Grin

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.
Logged

_________________________
There's nothing like EAFF (easy, affordable, fast & fun)
Dandy
Size D Battery
******

Pogi/Ganda Points: 11
Offline Offline

Posts: 418


« 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.   
Logged
paranz
Technical People
Nuclear Reactor
*****

Pogi/Ganda Points: 167
Offline Offline

Gender: Male
Posts: 4511


1/4W resistor specialist


« Reply #59 on: August 05, 2008, 11:06:13 AM »

^ nice info. More please Wink
Logged
The Philippine Electronics and Technology Forum
   

 Logged
Pages: 1 2 [3] 4 5   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
comparison 2.4G na core 2 quad or 3.0G na core 2 dou? what to buy?
Chit Chat
marcelino 7 989 Last post August 23, 2008, 03:08:41 PM
by gtxr2.ren
core 2 duo and quad core « 1 2 »
Computer Hardware
lightelectro 28 3019 Last post March 13, 2009, 03:41:33 AM
by mark1x
Multiprocessor / Multi core programming using C
Microcontroller/Microprocessor Unit Projects and Programming
ManNoy VillAquino 8 644 Last post August 21, 2009, 04:11:02 PM
by insomartin
e and i core
Electrical/Electronic Parts and Suppliers
marleytrical 7 834 Last post December 31, 2009, 07:55:50 AM
by tony
Cpu only dual core with 5.1 edifier speaker
Items For Sale
rynce12 14 285 Last post March 24, 2011, 08:54:19 PM
by CHAMBA-LAKAS
Night Eyes Security Systems - with High Speed 8051 Core micro from STC
The DIY Hobbyist Corner
Dandy 0 95 Last post July 21, 2011, 03:00:09 PM
by Dandy
MOVED: The 8051 Core MCU - STARTER
Microcontroller/Microprocessor Unit Projects and Programming
toasted siopao 0 201 Last post August 29, 2011, 10:45:10 PM
by toasted siopao
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!