Solved

pic16f84 programming

Posted on 2003-10-27
7
2,242 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
Comment Utility
have you tried microchip applications assistance. They may help you for free.
0
 
LVL 3

Accepted Solution

by:
droswell earned 500 total points
Comment Utility


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

http://www.commlinx.com.au/led.htm
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Expert Comment

by:PranavJoshi
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

As you can read I recycle all my old hardware and the time has come that my power supply of 200 Watt cannot provide enough power for my backup server. I have lots of Compaq power supply's laying around, so I figured to use one of these PSU's. I t…
Introduction: When experiencing some peculiar problem with the functioning of your PC, how many times has it happened that you look for a solution and even google can’t help? It could be that you are one of the only few people on earth who ma…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now