All About Circuits Forum Running Light Project (LED)
 User Name Remember Me? Password
 Register Blogs FAQ Members List Today's Posts Search Today's Posts Mark Forums Read

 Notices Welcome to the All About Circuits forums.Our forum is a place where thousands of students, hobbyists and professionals from around the world share knowledge and ideas. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us.

 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.

#1
02-29-2008, 05:30 PM
 markidgmgig Junior Member Join Date: Jan 2008 Posts: 11
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
#2
02-29-2008, 11:12 PM
 HarveyH42 Senior Member Join Date: Jul 2007 Posts: 425

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...
#3
03-01-2008, 11:10 AM
 markidgmgig Junior Member Join Date: Jan 2008 Posts: 11

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.
#4
03-01-2008, 12:47 PM
 HarveyH42 Senior Member Join Date: Jul 2007 Posts: 425

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.

 Tags led, light, project, running

 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 NFA Fabrication The Projects Forum 4 01-20-2014 01:36 PM ericksmith The Projects Forum 3 09-03-2013 02:06 PM ridge84 Embedded Systems and Microcontrollers 4 11-29-2009 09:35 PM NorCal2500HD The Projects Forum 9 10-11-2009 01:56 PM

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Electronics Forums     General Electronics Chat     The Projects Forum     Homework Help     Electronics Resources Software, Microcomputing, and Communications Forums     Programmer's Corner     Embedded Systems and Microcontrollers     Computing and Networks     Radio and Communications Circuits and Projects     The Completed Projects Collection Abstract Forums     Math     Physics     General Science All About Circuits Commmunity Forums     Off-Topic     The Flea Market     Feedback and Suggestions

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.