Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Tools
Old 16th November 2009, 05:45 PM   #1
Default Novice looking for help

Hi all, I'm looking for some advice here. I used to be an electronic engineer but left the industry in 1992 to take up a career in IT so I have forgotten most of what I used to know. And anything I do remember is obsolete

A colleague of mine has a requirement for some electronic expertise and as I am the only 'technical' person he knows, he's turned to me.

The requirement is to control a number (up to 20ish) of small LEDs and program them to flash at varying intervals (each LED needs to flash with a different interval). He has a circuit which someone made for him a few years ago (the creator has sadly passed on) and it consists of 2 PIC16LF84A controllers.

I know nothing of these controllers and am wondering if:
a) Can I reverse engineer the programs on these controllers to get an idea of what is required
b) What tools do I need for the above and also to program new controllers
c) Are these controllers still available
d) Am I going about this the wrong way and is there an easier way to do this nowadays

Sorry for the long post but hopefully it all makes sense.

Any and all information/advice will be gratefully received.
StGeorge is offline  
Old 16th November 2009, 06:41 PM   #2
Default

Reference suggestions:
Go to Datasheet & Application Note Database, PDF, Circuits, Datasheets | Datasheet Archive to see if there is data on the PIC.
Multiple RC flasher circuits can feed the PIC input port, with a coding program to read each input and feed an output port. You can use 555, logic gate circuits, or electronic circuits from microwaves.
Are these LEDs individual, or in a matrix?
shokjok is offline  
Old 16th November 2009, 06:43 PM   #3
Default

Quote:
Originally Posted by shokjok View Post
Are these LEDs individual, or in a matrix?
They are individual LEDs.
StGeorge is offline  
Old 16th November 2009, 09:05 PM   #4
Default

George,
That microcontroller is pretty much obsolete these days. If you want to have a go at learning microcontrollers, have a look at this..
MICROCHIP|PG164120|PROGRAMMER, PICKIT 2 | Farnell United Kingdom
You will need the Low Count Demo board too.

Jim
jimmythefool is offline  
Old 16th November 2009, 09:56 PM   #5
Default

Thanks for the info Jim, much appreciated.

If I get this is it the same product with the board you indicated included with it?
StGeorge is offline  
Old 17th November 2009, 09:32 AM   #6
Default

Look at Talking Electronics website under: Elektor,EPE,Silicon Chip and it will show you programs to help you with what you are wanting to do.
colin55 is offline  
Old 17th November 2009, 03:44 PM   #7
Default

What do the LEDs do? What are the intervals, and are the LEDs on 50:50 duty or a small ON period and long OFF period?

If you provide more information its much easier for people to help you.
Mr RB is offline  
Old 17th November 2009, 04:09 PM   #8
Default

Quote:
Originally Posted by Mr RB View Post
What do the LEDs do? What are the intervals, and are the LEDs on 50:50 duty or a small ON period and long OFF period?

If you provide more information its much easier for people to help you.
Sorry, I'm new to this

The LEDs will be used at wildly varying intervals. For instance if I have a circuit with 10 LEDs 2 may be flashing at 1s on, 3s off. Another may be 250ms on, 250ms off. Some others could be 2s on, 500ms off.

They will vary that much and more but within each circuit a specific LED will always flash with the same interval.

I assumed that if I can write a program to control 10 (or more) LEDs then I can have standard routines for the on and off cycles and just insert them where necessary. However, I do know assumption is a dangerous thing
StGeorge is offline  
Old 17th November 2009, 04:28 PM   #9
Default

IMHO the easiest programming language to learn for a beginner is BASIC, and an excellent free student edition for the 18F series PICs is Swordfish BASIC SE.
Blinking LEDs would only take a few lines of code.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 17th November 2009, 04:41 PM   #10
Default

You will most probably be dealing with a timer interupt, and a bunch of counters.

Supposing each led has a static behaviour
You shall finish with something like (in mostly correct C99)


#define NUM_LED 10
#define DELAY_TYPE unsigned char
const DELAY_TYPE tOn[NUM_LED]{...values...};
const DELAY_TYPE tOff[NUM_LED]{...values...};
DELAY_TYPE counter[NUM_LED];
bool status[NUM_LED];

timerISR()
{
//deal with the interupt stuff
//insert a sub counter here if you need longer ticks than the one your mcu can provide
//as in
if(counter--)
return;
else
counter = divider;

for(int i=0; i < NUM_LED; i++)
{
if(status)
counter[i]--;
else
{
counter[i]=(status?tOff:tOn)[i];
status[i] = !status[i];
}
}
// deal some more with some interrupt related stuff here if needed
}

Plenty of optimisation to be done in there, but the question in the end is always, can you really be bothered if it works. In real life, the status array would most likely be the output buffer registers for your mv ports, and hence would be bit packed.

I could see how you would get more generic, but you would waste an awful lot of ressources to do so.

Last edited by superfrog; 17th November 2009 at 04:43 PM.
superfrog is online now  
Old 17th November 2009, 09:58 PM   #11
Default

Thanks for all the advice and information, I think I'm heading up the learning curve now.
StGeorge is offline  
Old 17th November 2009, 10:20 PM   #12
Default

Quote:
Originally Posted by StGeorge View Post
Thanks for the info Jim, much appreciated.

If I get this is it the same product with the board you indicated included with it?
Yep, thats the one
Its a cheap solution to get going with. If you order some 2.54mm header strip too, you can knock up any project you like on a breadboard, and use the header strip to program the PIC in circuit

Jim
jimmythefool is offline  
Reply

Tags
novice

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Novice needs help with power NickK1066 Electronic Projects Design/Ideas/Reviews 4 8th February 2009 02:40 AM
Help for a complete novice DAGONITWIT Electronic Projects Design/Ideas/Reviews 26 27th September 2008 04:43 PM
Novice..please Help!!!! Anurag_Singh Micro Controllers 11 17th February 2008 11:16 PM
Novice needs help Trevor Rymell Electronic Projects Design/Ideas/Reviews 13 22nd April 2006 02:10 PM
Any Expert to help this novice Raheem General Electronics Chat 3 11th May 2003 11:36 PM



All times are GMT. The time now is 12:58 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker