Solved

pic16f84 programming

Posted on 2003-10-27
7
2,287 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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Hello It is a very old trick to use a ram disk in order to boost PC performances, in the past, when in home environments the fastest common devices were floppy disks a part of the very small ram memory available was used to create a virtual hard …
I have purchased two new systems and both are now Universal Extensible Firmware Interface (UEFI) based. UEFI is replacing BIOS for the desktop PC. It is a Linux based firmware with enough robustness it can communicate with a website without loading …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

685 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