paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« on: July 15, 2008, 07:39:07 PM » |
|
This thread is for everyone who wants to learn how to program the PICmicrocontroller.  Gagamit po tayo ng MPLAB IDE and Hitech C compiler for program development and also P*rote*us Professional for simulation. We wont be needing a PIC demoboard, though if you have one, even on a breadboard, that is still ok. You might want to test you code on Proteus as well as on a real hardware. To get us started, you have to download and install MPLAB. Download MPLAB v8.10 hereThe installer already includes a free student version of Hi-tech C, PICClite compiler, which should be ok to use. Pwede rin kayo magdownload ng "free" version ng P*roteu*s. 
|
|
|
|
|
Logged
|
|
|
|
|
The Philippine Electronics and Technology Forum
|
 |
« on: July 15, 2008, 07:39:07 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« Reply #1 on: July 15, 2008, 09:04:34 PM » |
|
Check this old tutorial that i made: - installing MPLAB (version 7.2x? ang ginamit ko dito)
- install PICClite (separate pa ang installation ng picclite and MPLAB)
- making project using Hitech C in MPLAB
- compiling a project/program
download here
|
|
|
|
|
Logged
|
|
|
|
|
The Philippine Electronics and Technology Forum
|
 |
« Reply #1 on: July 15, 2008, 09:04:34 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
marcelino
Moderator
Solar Power Satellite
   
Pogi/Ganda Points: 256
Offline
Posts: 5958
...keep moving forward! - Robinson's
|
 |
« Reply #2 on: July 15, 2008, 10:43:32 PM » |
|
Nice! ok ka talga sir paranz! i am waiting for more... 
|
|
|
|
|
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 #2 on: July 15, 2008, 10:43:32 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« Reply #3 on: July 15, 2008, 10:46:46 PM » |
|
Nice! ok ka talga sir paranz! i am waiting for more...  ire-recycle ko lang yung discussion sa zilog encore tutorial thread 
|
|
|
|
|
Logged
|
|
|
|
|
Cute_Worm_1983
|
 |
« Reply #4 on: July 15, 2008, 11:04:48 PM » |
|
thanks for nice thread 
|
|
|
|
|
Logged
|
I love electronicslab.ph
|
|
|
7_SeVeN_7
Technical People
Solar Power Satellite
   
Pogi/Ganda Points: 385
Offline
Posts: 5974
There is no delight in owning anything unshared.
|
 |
« Reply #5 on: July 15, 2008, 11:10:07 PM » |
|
|
|
|
|
|
Logged
|
E-Gizmo Mechatronix Central: www.e-gizmo.comTel #: (63)(2) 536-3378 Globe +63915-973-7691 Smart +63921-779-0748 Location MapYM: julie.egizmo aka Born2BeWired 
|
|
|
glutnix_neo
Technical People
Hydroelectric
   
Pogi/Ganda Points: 135
Offline
Gender: 
Posts: 3485
Developing code for "humans" since 2004
|
 |
« Reply #6 on: July 16, 2008, 07:21:07 AM » |
|
more power sir Paranz!!! hindi lumabas sa unread topic ko to ah.
|
|
|
|
|
Logged
|
|
|
|
RaffT
Technical People
Hydroelectric
   
Pogi/Ganda Points: 99
Offline
Gender: 
Posts: 3334
more on R-n-D
|
 |
« Reply #7 on: July 16, 2008, 07:24:26 AM » |
|
ok pala itong bagong installer ng MPLAB.. may kasama nang PICC-lite hehehe yung 7.1 ko wala... tenx to MPLAB..tenx to sir Paranz!  masubukan nga mamaya... uhm.. OT: pwede ba ang CCS C ma-integrate sa MPLAB?
|
|
|
|
|
Logged
|
Learning is CooL! BEAM robotics/DIY UCD180/PSP/AC wtmtr/digiESRmtr/PICkit™2 clone/SGTC/SSTC/DR-SSTC
|
|
|
glutnix_neo
Technical People
Hydroelectric
   
Pogi/Ganda Points: 135
Offline
Gender: 
Posts: 3485
Developing code for "humans" since 2004
|
 |
« Reply #8 on: July 16, 2008, 07:28:55 AM » |
|
ok pala itong bagong installer ng MPLAB.. may kasama nang PICC-lite hehehe yung 7.1 ko wala... tenx to MPLAB..tenx to sir Paranz!  masubukan nga mamaya... uhm.. OT: pwede ba ang CCS C ma-integrate sa MPLAB? yup pwede bro, ang alam ko may mga mplab installer na may trial version din ng ccs
|
|
|
|
|
Logged
|
|
|
|
paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« Reply #9 on: July 16, 2008, 07:31:28 AM » |
|
welcome sis  more power sir Paranz!!! hindi lumabas sa unread topic ko to ah.
i feel powerful already  ok pala itong bagong installer ng MPLAB.. may kasama nang PICC-lite hehehe yung 7.1 ko wala... tenx to MPLAB..tenx to sir Paranz!  masubukan nga mamaya... uhm.. OT: pwede ba ang CCS C ma-integrate sa MPLAB?Pwedeng-pwede, but you will need to install the MPLAB plugin that comes with the CCS C installer so that the MPLAB IDE will be able to detect CCS C compiler 
|
|
|
|
|
Logged
|
|
|
|
maldihtah13
Technical People
Nuclear Reactor
   
Pogi/Ganda Points: 114
Offline
Gender: 
Posts: 4499
Everyday is a learning process so try to learn ;D
|
 |
« Reply #10 on: July 16, 2008, 08:43:32 AM » |
|
Gusto ko rin matuto ng c kya lang picbasic na nasimulan ko.
|
|
|
|
|
Logged
|
|
|
|
eveready battery
Diesel Generator
Pogi/Ganda Points: 38
Offline
Posts: 1221
Garbage In Garbage Out.
|
 |
« Reply #11 on: July 16, 2008, 11:18:24 AM » |
|
@paranz more power sir paranz,this thread will be useful both students and professionals.
|
|
|
|
|
Logged
|
Signing Off...
|
|
|
paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« Reply #12 on: July 16, 2008, 04:33:45 PM » |
|
A PIC microcontroller is essentially a tiny computer inside a single chip. It is an integrated circuit (IC) that includes a CPU, a small amount of RAM (less than 1kb), a small amount of EEPROM/FLASH-based program memory (a few thousand kb) for program storage, a few input/output pins, and some hardware peripherals like timers, ADC, UARTs, etc. The popular PIC16F84a (shown below), for example, has a RISC CPU, a 1024-word program memory, a mere 68 bytes of data RAM, and a maximum clock speed of 20 Mhz. FIGURE 1. 18-pin PIC16F84A Since the PIC MCU (short for MiCrocontroller Unit) is technically a complete computer on its own, it would help to think of the program memory as equivalent to the hard disk of a desktop or laptop computer and the data RAM as equivalent to a PC’s main memory. As comparison between a PIC16F84a MCU and a typical desktop PC, refer to the table below: Table 1. A comparison
|
|
|
|
|
Logged
|
|
|
|
paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« Reply #13 on: July 16, 2008, 04:50:41 PM » |
|
Based on the table above, you may conclude correctly that the PIC16F84A MCU pales in comparison with the desktop PC. The MCUs can’t perform word processing nor can you play your favorite PC games with it.  Nevertheless, MCUs has sufficient computing capability to control, say, a DC motor, display text to an LCD, turn on a relay, scan a keypad, control a small robot, display numerical values to a 7-segment display (like in Figure 2 below), send a serial data to PC, etc. Its tiny form factor makes it easy to “embedded” into many applications. And it’s cost /computing power is quite astonishing for its size. A several-million dollar “super-computer” of the late 1960’s weighs several tones, fit into a very large room (a hall, actually  ), and is 1000 times slower than this MCU.  FIGURE 2. The PIC16F84a on an application board
|
|
|
|
|
Logged
|
|
|
|
paranz
Moderator
Nuclear Reactor
   
Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 4512
1/4W resistor specialist
|
 |
« Reply #14 on: July 16, 2008, 04:56:17 PM » |
|
MCUs are so successful that for every desktop/laptop computer in the world today, there are at least 10 MCUs running on some embedded platforms. You can find them on your air conditioning system, microwave oven, cars, toys, electronic gadgets, etc. Even the motherboard of your PC has at least 1 MCU on it! Think keyboard controllers. Many argue that the computing revolution that is happening for the past 30 years is mainly due to microcontrollers and not just the typical PC. When this tutorial is over, you might agree with the last statement.  Based on my *limited experience  (and those of others), what you can do with an MCU is virtually limited by your own imagination as well as your technical knowledge. (Nope, it can’t water the plant or bake you some cookies. Or can it?)  Imagination we have in abundance. Technical knowledge, well, that is something that this on-line tutorial will provide. Ok, ‘naff said. Let’s start programming, shall we? 
|
|
|
|
|
Logged
|
|
|
|
1110000
Gas Turbine

Pogi/Ganda Points: 28
Offline
Gender: 
Posts: 2059
6 yrs ng napa2Xso sa soldern iron at di pa titigil
|
 |
« Reply #15 on: July 16, 2008, 05:08:57 PM » |
|
okay na start na 
|
|
|
|
|
Logged
|
E153C51513
|
|
|
1110000
Gas Turbine

Pogi/Ganda Points: 28
Offline
Gender: 
Posts: 2059
6 yrs ng napa2Xso sa soldern iron at di pa titigil
|
 |
« Reply #16 on: July 16, 2008, 08:09:05 PM » |
|
wala pa 
|
|
|
|
|
Logged
|
E153C51513
|
|
|
|
Cute_Worm_1983
|
 |
« Reply #17 on: July 16, 2008, 08:12:22 PM » |
|
|
|
|
|
|
Logged
|
I love electronicslab.ph
|
|
|
rdpzycho
Technical People
Solar Power Satellite
   
Pogi/Ganda Points: 512
Offline
Gender: 
Posts: 9583
Perfection is an Illusion
|
 |
« Reply #18 on: July 16, 2008, 08:23:48 PM » |
|
MCUs are so successful that for every desktop/laptop computer in the world today, there are at least 10 MCUs running on some embedded platforms. You can find them on your air conditioning system, microwave oven, cars, toys, electronic gadgets, etc. Even the motherboard of your PC has at least 1 MCU on it! Think keyboard controllers. Many argue that the computing revolution that is happening for the past 30 years is mainly due to microcontrollers and not just the typical PC. When this tutorial is over, you might agree with the last statement.  OT lang: tama talaga 'to. Freescale's CTO actually envisions a ratio in the range of 1 person to 1000 embedded controllers in the next few years to come. a modern car already contains around 50 MCU's.
|
|
|
|
|
Logged
|
"Divide each difficulty into as many parts as is feasible and necessary to resolve it." - Rene Descartes
"Keep on starting, and finishing will take care of itself." - Neil Fiore
|
|
|
beginner wan
Diesel Generator
Pogi/Ganda Points: 46
Offline
Gender: 
Posts: 1454
Think Positive! Matutupad yang dream mo!
|
 |
« Reply #19 on: July 16, 2008, 08:30:17 PM » |
|
nice one daddy.. isang tutorial na naman.. 
|
|
|
|
|
Logged
|
i;0.?QrEpM?4DEZZ]bkH{w@F<38.Jq@92Ds3KPQj60?EA7U\3M<A84J|AI.H R@>&?Ej,@;5H)o::7KE/:?QcXf?gX'39=,Z_Q[eYXc
|
|
|
|
The Philippine Electronics and Technology Forum
|
|
|
|
|
|
Logged
|
|
|
|
|