caramoan tour package

caramoan tour package

Author Topic: PIC Tutorial using Hi-tech C and Proteus  (Read 111774 times)

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
PIC Tutorial using Hi-tech C and Proteus
« on: July 15, 2008, 07:39:07 PM »
This thread is for everyone who wants to learn how to program the PICmicrocontroller.  8)

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

Philippine Electronics Forum

PIC Tutorial using Hi-tech C and Proteus
« on: July 15, 2008, 07:39:07 PM »

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: PIC Tutorial using Hi-tech C and Proteus
« 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

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: PIC Tutorial using Hi-tech C and Proteus
« Reply #1 on: July 15, 2008, 09:04:34 PM »

Offline marcelino

  • Moderator
  • Solar Power Satellite
  • *****
  • Posts: 6016
  • Pogi/Ganda Points: 258
  • ...keep moving forward! - Robinson's
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #2 on: July 15, 2008, 10:43:32 PM »
Nice! ok ka talga sir paranz!
i am waiting for more...:)
"Don't take life seriously. After all, no one has ever come out of it alive. -Bugs Bunny"

Philippine Electronics Forum

Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #2 on: July 15, 2008, 10:43:32 PM »

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: PIC Tutorial using Hi-tech C and Proteus
« 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  ;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

Philippine Electronics Forum

Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #3 on: July 15, 2008, 10:46:46 PM »

Offline Cute_Worm_1983

  • Size D Battery
  • ******
  • Posts: 418
  • Pogi/Ganda Points: 16
  • Gender: Male
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #4 on: July 15, 2008, 11:04:48 PM »
thanks for nice thread  ;D
I love electronicslab.ph

Philippine Electronics Forum

Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #4 on: July 15, 2008, 11:04:48 PM »

Offline 0b00000111

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 6129
  • Pogi/Ganda Points: 398
  • There is no delight in owning anything unshared.
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #5 on: July 15, 2008, 11:10:07 PM »
Thanks Miss Paranz! ;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 glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4161
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #6 on: July 16, 2008, 07:21:07 AM »
more power sir Paranz!!! hindi lumabas sa unread topic ko to ah.
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

Offline RaffT

  • Technical People
  • Hydroelectric
  • *****
  • Posts: 3440
  • Pogi/Ganda Points: 103
  • Gender: Male
  • more on R-n-D
    • MY Bots
Re: PIC Tutorial using Hi-tech C and Proteus
« 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! :D

masubukan nga mamaya... uhm.. OT: pwede ba ang CCS C ma-integrate sa MPLAB?
Learning is CooL! BEAM robotics/DIY UCD180/PSP/AC wtmtr/digiESRmtr/PICkit™2 clone/SGTC/SSTC/DR-SSTC

Never argue with an idiot... They'll take you down to their level and beat you with experience

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4161
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: PIC Tutorial using Hi-tech C and Proteus
« 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! :D

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

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #9 on: July 16, 2008, 07:31:28 AM »
Thanks Miss Paranz! ;D ;D ;D

welcome sis  ;D


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

i feel powerful already  ;D


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! :D

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  ;)

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 maldihtah13

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4669
  • Pogi/Ganda Points: 120
  • Gender: Female
  • Everyday is a learning process so try to learn ;D
    • Blogspot
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #10 on: July 16, 2008, 08:43:32 AM »
Gusto ko rin matuto ng c kya lang picbasic na nasimulan ko.

Offline subzer0

  • Diesel Generator
  • *
  • Posts: 1222
  • Pogi/Ganda Points: 38
  • Garbage In Garbage Out.
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #11 on: July 16, 2008, 11:18:24 AM »
@paranz
more power sir paranz,this thread will be useful both
students and professionals.
Signing Off...

Offline paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Intro to PIC Microcontrollers
« 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

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 paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: PIC Tutorial using Hi-tech C and Proteus
« 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  ;D), and is 1000 times slower than this MCU.  :o



FIGURE 2. The PIC16F84a on an application board


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 paranz

  • Moderator
  • Nuclear Reactor
  • *****
  • Posts: 4525
  • Pogi/Ganda Points: 177
  • Gender: Male
  • 1/4W resistor specialist
    • RapidSignal Electronics
Re: PIC Tutorial using Hi-tech C and Proteus
« 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.  :D

Based on my *limited experience  ;D (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?  8)


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 1110000

  • Gas Turbine
  • **
  • Posts: 2059
  • Pogi/Ganda Points: 28
  • Gender: Male
  • 6 yrs ng napa2Xso sa soldern iron at di pa titigil
    • http://yelectronics.net63.net
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #15 on: July 16, 2008, 05:08:57 PM »
okay na start na ;D
E153C51513

Offline 1110000

  • Gas Turbine
  • **
  • Posts: 2059
  • Pogi/Ganda Points: 28
  • Gender: Male
  • 6 yrs ng napa2Xso sa soldern iron at di pa titigil
    • http://yelectronics.net63.net
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #16 on: July 16, 2008, 08:09:05 PM »
wala pa :(
E153C51513

Offline Cute_Worm_1983

  • Size D Battery
  • ******
  • Posts: 418
  • Pogi/Ganda Points: 16
  • Gender: Male
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #17 on: July 16, 2008, 08:12:22 PM »
 ;D ;D ;D
I love electronicslab.ph

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10726
  • Pogi/Ganda Points: 632
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: PIC Tutorial using Hi-tech C and Proteus
« 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.  :D

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.
‎"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

Offline beginner wan

  • Diesel Generator
  • *
  • Posts: 1451
  • Pogi/Ganda Points: 46
  • Gender: Male
  • Think Positive! Matutupad yang dream mo!
    • [im]Duino
Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #19 on: July 16, 2008, 08:30:17 PM »
nice one daddy.. isang tutorial na naman.. :D
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

Philippine Electronics Forum

Re: PIC Tutorial using Hi-tech C and Proteus
« Reply #19 on: July 16, 2008, 08:30:17 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com