Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2325
  • Last Modified:

pic16f84 programming

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
itayi_luke
Asked:
itayi_luke
1 Solution
 
publicCommented:
have you tried microchip applications assistance. They may help you for free.
0
 
droswellCommented:


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
 
droswellCommented:
HEre's a site with some circuit designs at the bottom for your pic

http://www.commlinx.com.au/led.htm
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
PranavJoshiCommented:
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
 
AlbertaBeefCommented:
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
 
AlbertaBeefCommented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now