All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Programmer's Corner

Notices

Programmer's Corner Discussion forum for all aspects of programming and software engineering. Any software programming language welcome: C, C++, C#, Fortran, Java, Matlab, etc.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 02-29-2008, 05:30 PM
markidgmgig markidgmgig is offline
Junior Member
 
Join Date: Jan 2008
Posts: 11
Default Running Light Project (LED)

I was assigned to make 4 programs that will satisfy the asked outputs and is to be programmed on PIC. (sadly i wasn't able to attend our scheduled seminar regarding PIC programming due to time restraint. so i thought of coming here again and would like to ask for help. I'd be thankful if you could help me with my project.)

1.) Running Light that will turn on/off all leds

Given were 8 leds with a time delay.

Cycle 1: 1 2 3 4 5 6 7 8 = on
Cycle 2: 1 2 3 4 5 6 7 8 = off

2) Running light that will turn on/off led one at a time

Cycle 1: 1 = on | 2 3 4 5 6 7 8 = off
Cycle 2: 2 = on | 1 3 4 5 6 7 8 = off
Cycle 3: 3 = on | 1 2 4 5 6 7 8 = off
Cycle 4: 4 = on | 1 2 3 5 6 7 8 = off
so on and so forth...

3) Running light that will turn on odd turn off even leds and vice versa

Cycle 1: 1 3 5 7 = on | 2 4 6 8 = off
Cycle 2: 2 4 6 8 = on | 1 3 5 7 = off

4) This time running light that will turn on/off led one at a time AND THEN runs reversed

Cycle 1: 1 = on | 2 3 4 5 6 7 8 = off
Cycle 2: 2 = on | 1 3 4 5 6 7 8 = off
Cycle 3: 3 = on | 1 2 4 5 6 7 8 = off
Cycle 4: 4 = on | 1 2 3 5 6 7 8 = off
so on and so forth...

Cycle 9: 8 = on | 1 2 3 4 5 6 7 = off
Cycle 10: 7 = on | 1 2 3 4 5 6 8 = off
Cycle 11: 6 = on | 1 2 3 4 5 7 8 = off
Cycle 12: 5 = on | 1 2 3 4 6 7 8 = off
Reply With Quote
  #2  
Old 02-29-2008, 11:12 PM
HarveyH42 HarveyH42 is offline
Senior Member
 
Join Date: Jul 2007
Posts: 425
Default

I don't do PIC, but can imagine the hundreds of similar projects on the web, if not here in this forum. Have you tried the search function, or Google? You didn't mention what language, or which compiler. By the way, this is so insanely simple, you should be ashamed of yourself for asking.

Just in case no one here is feeling like showing some pity, and taking 15-20 minutes writing your homework for you... Will help you get started on your own. First, get the datasheet for the PIC you intend to use, need at least 8 I/O pins. Next, search the web for a beginner's tutorial in which ever language you plan on using. The very first thing most every tutorial start with, set a port/pin for output, and flashing an LED. If you can flash one LED, it's simple to flash 8. I did the night-rider one as my second program when I started AVR, took about 20 minutes in assembly. I hadn't programmed anything since the late 80's.

For the most part, if you start a project before asking for help, you will get dozens of replies, helping you fix the code/circuit you post. Skipping class, then asking strangers to do the work for you...
Reply With Quote
  #3  
Old 03-01-2008, 11:10 AM
markidgmgig markidgmgig is offline
Junior Member
 
Join Date: Jan 2008
Posts: 11
Default

Yes it can be done through assembly language. Sorry I just don't want to practice this and i'm not into programming. PIC16F84A is the used PIC.

http://ww1.microchip.com/downloads/e...doc/35007b.pdf

Last edited by markidgmgig; 03-01-2008 at 12:13 PM.
Reply With Quote
  #4  
Old 03-01-2008, 12:47 PM
HarveyH42 HarveyH42 is offline
Senior Member
 
Join Date: Jul 2007
Posts: 425
Default

If you really expect to get help, you need to at least get started on it, and post the code you have so far. I don't use PIC, but I have used PIC tutorials to get some insight on how to do a few things. I know just enough PIC stuff, that I might struggle through doing it in assembly, and I've never used one. PIC only have 32 instructions, and one register. No big deal with a high level language, like 'C', and probably not so bad once you've get a good collection of routines. I chose AVR, because it seemed a little more friendly for assembly, with 130 instructions and 32 registers.

In my first reply, I gave some direction on how you can get started on your own. Seriously, search the web, you might find the exact program you are looking for, or something very close. Whether you are 'into' programming or not, you will need to start some place. I could post the code for my AVR running lights, but it wouldn't do you much good.

Seriously, this isn't that bad. If you know a little programing, you can do this.
Reply With Quote
Reply   Post New Thread

Tags
, , ,


Related Site Pages
Section Title
Worksheet Microcontroller principles
Worksheet Timer circuits
Worksheet Digital display circuits
Worksheet Design Project: Logic probe
Worksheet Thyristor application circuits
Worksheet Oscillator circuits
Worksheet Bipolar junction transistors as switches
Textbook CMOS 555 LONG DURATION MINIMUM PARTS RED LED FLASHER : 555 Timer Circuits
Textbook Special-purpose diodes : Diodes And Rectifiers
Textbook Conversion from decimal numeration : Numeration Systems


Similar Threads
Thread Thread Starter Forum Replies Last Post
LED As Light Sensor Project... NFA Fabrication The Projects Forum 4 01-20-2014 01:36 PM
LED Lamp with Light Sensor Project ericksmith The Projects Forum 3 09-03-2013 02:06 PM
Pls help me.Need advice ridge84 Embedded Systems and Microcontrollers 4 11-29-2009 09:35 PM
New guy here....Green LED fishing light...Long Post... NorCal2500HD The Projects Forum 9 10-11-2009 01:56 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:53 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.