Solved

pic16f84 programming

Posted on 2003-10-27
7
2,305 Views
Last Modified: 2013-12-10
iam doing an embedded systems project using the pic16f84 picocontroller. its purpose is to measure times of two cars in drag race with the assistance of infra red sensors. the whole thing starts of with a sequence of traffic lights(l.e.d.s.) that change from red, amber and then to green. a delay of 1 sec is assumed. when the grren light goes on the timers for both cars start the timing and at the end of the racing distance are infra red sensors for each car. the lanes are separated to allow for the infra red to allow each car to have its own infra red beam ti trip. when disturbed they will make the particular clock to stop. i need help on the circuit design and the programming of the pic16f84.
0
Comment
Question by:itayi_luke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 12

Expert Comment

by:public
ID: 9627221
have you tried microchip applications assistance. They may help you for free.
0
 
LVL 3

Accepted Solution

by:
droswell earned 500 total points
ID: 9687424


Here's some info:
________________________________________________________

INPUT/OUTPUT PORTS:
The 16F84 has 13 pins that can be individually configured as either inputs or outputs. They a divided into PORTA, (5 bits), and PORTB, (8 bits). The direction of each bit is determined by the bits in the corresponding direction registers TRISA and TRISB. A zero means the bit will be an output, a 1 means input. To set up PORTB with alternating inputs and outputs:

      MOVLW $AA             ; port pattern '10101010'
      TRIS TRISB            ; W is placed into register TRISB

Certain port pins are also hooked to other functions of the processor. The high 4 bits of PORTB can be used as interrupt pins when they are programmed as inputs. The high bit of PORTA is also used as an external clock input for the counter/timer. Bit 0 of PORTB (RB0/INT) can be used for an external interrupt.

_________________________________________________


PINOUTS
name:         PIC16F84
function:     8 Bit CMOS Microcontroller
package:      18 Pin DIP,18
manufacturer: Microchip Technology Inc.
added-by:     Roy Sutton
comment:      Flash/EEPROM

                  +--()--+
           RA2 | 1  18| RA1
           RA3 | 2  17| RA0
RA4/T0CKL | 3  16| OSC1/CLKIN
       /MCLR | 4  15| OSC2/CLKOUT
           VSS | 5  14| VDD
    RB0/INT | 6  13| RB7
           RB1 | 7  12| RB6
           RB2 | 8  11| RB5
           RB3 | 9  10| RB4
                  +------+
 
This information was added by a third party and may be incorrect.

This pinout came from the Chipdir:
http://www.chipdir.org/

___________________________________________________

***What you'll need as far as a circuit design***


Outputs (LEDS)
You can probably drive small LEDs directly off the pin- just add a 470 Ohm resistor

                                               
                          470 ohms      led
 PIC pin -----------/\/\/\/-------|>----------|
                                                            |
                                                           gnd


INPUTS
(IR receivers)
Your inputs depend on the infrared receiver, but will probably look like this:

                                        |  +5v
                                        |
                                        O IR receiver
                         1kohm     |
PIC  pin  <--------/\/\/\-----|



Make sure your PIC can source the current from your IR receiver.

Hope this helps!
DRos.

0
 
LVL 3

Expert Comment

by:droswell
ID: 9687453
HEre's a site with some circuit designs at the bottom for your pic

http://www.commlinx.com.au/led.htm
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Expert Comment

by:PranavJoshi
ID: 9728877
Please make a list of all the circuit components that you are thinking of using and determine how much functionality you are thinking of putting on the PIC Microcontroller. A good website to refer is

www.melabs.com (Microengineering Labs located in colorado USA).

     They have the programming compilers for PIC Microcontrollers for free the comlipers name is Code Designer and it is a free download and install compiler.

     Please do provide further detail.

thanks,


Pranav joshi
0
 
LVL 13

Expert Comment

by:AlbertaBeef
ID: 9807348
Well, it's been a while since any comment has been made and it's time to cleanup this TA.

To the Questioner:  If one of the experts here answered your question, please accept that answer, or split points among experts if it's appropriate.

Experts, please leave any closing recommendations here within one weeks time so a final recommendation can be made - No comment means you don't care!

I'll check back and leave my final recommendation to the Cleanup TA in one weeks' time.

AlbertaBeef
EE Cleanup Volunteer
0
 
LVL 13

Expert Comment

by:AlbertaBeef
ID: 9847533
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: droswell{9687424}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

AlbertaBeef
EE Cleanup Volunteer
Page Editor, Desktops/Microchips TA's
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

System overheating may become a serious problem if not taken care of at the proper time. I am writing this article because I faced a similar problem. Intro All electronic devices produce heat, but computers are a special case - the processors bo…
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question