Solved

pic16f84 programming

Posted on 2003-10-27
7
2,267 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
*NEW* Titan x possible bandwidth issues 3 157
swaping perc card in DELL PE 2900 5 49
fans of one ProLiant randomly(?) speeding up to 100%!? 15 93
Server backups 5 37
Or at least that’s the word according to a new blog from Tech Target on AWS’s new Managed Services (MS) offering. According to the blog, AWS is launching their AWS MS program to expedite the adoption of cloud by Fortune 1000 and Global 2000 companie…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

806 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