The Philippine Electronics and Technology Forum
May 17, 2012, 06:38:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 58   Go Down
  Print  
Author Topic: PIC Tutorial using Hi-tech C and Proteus  (Read 103948 times)
paranz
Moderator
Nuclear Reactor
*****

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
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.  Cool

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 here

The 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.  Grin



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 Offline

Gender: Male
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 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...Smiley
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 Offline

Gender: Male
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...Smiley

ire-recycle ko lang yung discussion sa zilog encore tutorial thread  Grin

Logged
Cute_Worm_1983
Size D Battery
******

Pogi/Ganda Points: 16
Offline Offline

Gender: Male
Posts: 418



« Reply #4 on: July 15, 2008, 11:04:48 PM »

thanks for nice thread  Grin
Logged

I love electronicslab.ph
7_SeVeN_7
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 385
Offline Offline

Posts: 5974


There is no delight in owning anything unshared.


« Reply #5 on: July 15, 2008, 11:10:07 PM »

Thanks Miss Paranz! 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
glutnix_neo
Technical People
Hydroelectric
*****

Pogi/Ganda Points: 135
Offline Offline

Gender: Female
Posts: 3485


Developing code for "humans" since 2004


WWW
« Reply #6 on: July 16, 2008, 07:21:07 AM »

more power sir Paranz!!! hindi lumabas sa unread topic ko to ah.
Logged

If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com
RaffT
Technical People
Hydroelectric
*****

Pogi/Ganda Points: 99
Offline Offline

Gender: Male
Posts: 3334


more on R-n-D


WWW
« 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! Cheesy

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 Offline

Gender: Female
Posts: 3485


Developing code for "humans" since 2004


WWW
« 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! Cheesy

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

If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com
paranz
Moderator
Nuclear Reactor
*****

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 4512


1/4W resistor specialist


« Reply #9 on: July 16, 2008, 07:31:28 AM »

Thanks Miss Paranz! Grin Grin Grin

welcome sis  Grin


more power sir Paranz!!! hindi lumabas sa unread topic ko to ah.

i feel powerful already  Grin


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! Cheesy

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  Wink

Logged
maldihtah13
Technical People
Nuclear Reactor
*****

Pogi/Ganda Points: 114
Offline Offline

Gender: Female
Posts: 4499


Everyday is a learning process so try to learn ;D


WWW
« 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 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 Offline

Gender: Male
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 Offline

Gender: Male
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.  Roll Eyes

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  Grin), and is 1000 times slower than this MCU.  Shocked



FIGURE 2. The PIC16F84a on an application board


Logged
paranz
Moderator
Nuclear Reactor
*****

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
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.  Cheesy

Based on my *limited experience  Grin (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?)   Roll Eyes  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?  Cool


Logged
1110000
Gas Turbine
**

Pogi/Ganda Points: 28
Offline Offline

Gender: Male
Posts: 2059


6 yrs ng napa2Xso sa soldern iron at di pa titigil


WWW
« Reply #15 on: July 16, 2008, 05:08:57 PM »

okay na start na Grin
Logged

E153C51513
1110000
Gas Turbine
**

Pogi/Ganda Points: 28
Offline Offline

Gender: Male
Posts: 2059


6 yrs ng napa2Xso sa soldern iron at di pa titigil


WWW
« Reply #16 on: July 16, 2008, 08:09:05 PM »

wala pa Sad
Logged

E153C51513
Cute_Worm_1983
Size D Battery
******

Pogi/Ganda Points: 16
Offline Offline

Gender: Male
Posts: 418



« Reply #17 on: July 16, 2008, 08:12:22 PM »

 Grin Grin Grin
Logged

I love electronicslab.ph
rdpzycho
Technical People
Solar Power Satellite
*****

Pogi/Ganda Points: 512
Offline Offline

Gender: Male
Posts: 9583


Perfection is an Illusion


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

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 Offline

Gender: Male
Posts: 1454


Think Positive! Matutupad yang dream mo!


WWW
« Reply #19 on: July 16, 2008, 08:30:17 PM »

nice one daddy.. isang tutorial na naman.. Cheesy
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
Pages: [1] 2 3 ... 58   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
proteus tutorial
PCB Design
eldefonso 7 1605 Last post July 18, 2008, 09:40:00 AM
by maldihtah13
HELP MPLAB AND HI TECH « 1 2 »
PIC Microcontrollers
tawe0023 21 1796 Last post August 06, 2010, 09:22:22 PM
by travian19
tech
Television Repair
sundyhips 0 270 Last post March 01, 2010, 11:29:16 AM
by sundyhips
Hi Tech C
General Electronics and Technology Discussion
fran2no 0 267 Last post August 13, 2010, 10:43:45 PM
by fran2no
Air Con Tech / Electrician
Job Vacancies
Pro-Engineer 0 112 Last post November 04, 2010, 09:33:52 PM
by Pro-Engineer
penge pong proteus isis 7 professional tutorial links or ebook
PIC Microcontrollers
studyante 5 378 Last post March 12, 2011, 08:10:17 AM
by studyante
Hi-tech AVR AVS-1.5kv
Electronic Appliances/Devices Repair (Electronics Technician Forum)
noman75 9 339 Last post December 19, 2011, 11:50:17 AM
by noman75
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!