Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simple PIC question

Status
Not open for further replies.

George L.

New Member
Hello,

I was wondering about the LED bar on a site which has alternating flashing patterns.

**broken link removed**
(watch the video on the bottom)

can something like this be done with a PIC? I have no programming experience, but am average at electronics. Would it be difficult for a beginner to do?

Nigel, this is your area of expertise!

thanks,

George L.
 
Yes, that can be done. It's quite easy. The individual LEDs aren't even controlled separately; it looks like just two separate banks, each bank being wired together.

Mike
 
Thanks for the respone,

I would like to purchase a pic programmer, such as the one here:

**broken link removed**

Can someone tell me which PIC chip to use that would make it easy and educational. I would use this project to learn programming, PIC, etc.

thanks,

George L.
 
I agree, two output pins and one input pin (or more inputs for more effects) on either a PIC or Atmel will be pretty easy.

The 16F84 PIC (popular chip) or ATMEL 1200 (A non-RAM version of the 2313 popular chip).

Check digikey for prices, or other supply houses.. I personally would go with a Tiny11 for $0.50 a chip (keep the spares around for other projects), I have some on order to re-design a project using Atmel 1200s.

Atmel way:

Atmel has an STK-500 programmer (probably newer model now), or you can search the microcontroller forum here for a simple parallel port programmer you can make (I saw one in the last 5 days in one of the forums). I would go to www.bastoc.com and pull RVKBASIC for the compiler as you are new and it will make life simpler.

PIC way:

The the programmer and software you picked is fine. I use the EPIC from MicroLabs and a Dontronics kit that was cheap and works (P16PRO40 type). I have MicroLabs basic compiler too (but it is NOT free).

Last thing on the programming language:

Last option on the compiler, there are free C compilers for both or you can learn assembler (OR RVKBASIC if you pick Atmel).

Just how much work and time do you want to put in the learning of the microcontroller? That is the real question. And people here, if you are detailed in the questions, and show you made an attempt, will help you out.
 
lol this cracks me up

*lawyer hat on*
how do we know the original poster is a properly acredited law enforcement officer for his/her location?

by giving this person advice, YOU could be assisting a CRIMINAL (in the USA, it is both a state and federal felony to impersonate a law enforcement officer - I'm sure similar laws exist world wide)
*lawyer hat off*

shame shame shame

reference:
https://www.electro-tech-online.com/threads/slotted-optical-sensors.21164/
 
DISCLAIMER. If you are trying to play cop or DOT employee with this, it is against the law and you are childish or sick..

Is this for law enforcement? I thought they wanted to blink two banks of LEDs. I do not even recall a car in what I saw as I cut it off when I saw two banks of blinking LEDS. What I saw on my black and white VGA monitor machine with no sound card.

But a very good point, I would not put them on my car so they probably (and most likely) do not need them. They might want to do colors like all the neons now on cars... Could be a kid. I provided no software, no hardware, just that it is simple and these are the chips I would use if I wanted one.

And I don't need one.

Next time I will ask what is it for and what colors are you planning to use..

Nigel will remove it if he thinks it is a little odd I am sure. But you bring up a good point with all the weirdos out there. And I have family..

Thank justDIY
 
Fist of all I am not a police officer nor is it for law enforcement,

I am a senior in high school,

I think you guys are over reacting. I am not a criminal. I used that site for an example of a LED flasher that can change patterns. Found it on a Google search. I want to try to use PIC for a simple project, a flasher that can change patterns was what I had in mind, it seems simple.

thanks for the accusation Just DIY!

George L.
 
justDIY said:
by giving this person advice, YOU could be assisting a CRIMINAL
Wrong. The original poster wants to blink LEDs with a PIC. Helping someone do that is not a crime. What he chooses to do with those blinking LEDs is nobody else's responsibility.

Mike
 
upand_at_them,

You are right, but I never thought about it and it would never come back on me or this forum. BUT, I have 3 kids and a wife that drive all over shopping, school, ball games ,etc.

Sometimes at night and it made me think about that aspect of it and I do not know this person at all. So justDIY has a point there for me in this case.

But he explained. So all good I hope now.

Sometime we are in a hurry to help and do not see this person wants to make police lights.
 
It is always good to be cautious.

I appreciate the help, mramos1 and up_at_them,

thanks for everything.

I will be buying a book to learn C and will buy a programmer.
You didn't just help someone that is just asking, I will put the information you gave me to use and hopefully come out with more knowledge and some cool project.

By the way, can everyone stop calling me "the original poster, they, and he"...I'm George L. :lol:
 
George L.

C is fine for projects and free (in most cases). The PIC line is great.. So you read the information correctly.

Wish you luck and do not make police lights (or colors)..

And I would think you might want to try assembler. It is not really that hard.

To me, BASIC is simple (syntax, no declare/define, and fast to write) and if I had to write in C, I would just do it in assembler (I can hear Nigel now, that's right (the assembler part)).

The little more time to write the code in assembler is not that bad if you think you might have to debug a fair sized project. C and basic binaries are a pain to debug. Native ASM for me, the symbol tables, etc. You see the labels and the code you wrote. A lot easier to debug.
 
You might have a look at my first tutorial?, that gives a number of examples of flashing LED's, and would be simple to alter to do exactly what you want!.
 
Hiya George.L,
Eh mate for a programmer you might want to look at the ICD2 clone. You can build one yourself or sparkfun has 1 for $99 US. I bought one and I've never looked back. Anyway the JDM programmer you gave the link to is very limited in pic capacity and has the dreaded issue of the serial port. With the ICD you can program every pic out there and it's also future proof as mplab downloads the operating code to it.

Check it out mate

Cheers Bryan :D
 
Hi George L,
You can build your own programmer VERY easily. Heres one that Ive used for a long time:
**broken link removed** (ignore the "16f84" - its the same for the 628 and many others. Just check and match the pinouts) the cost? Look in your junk bins, or UNDER 3 DOLLARS....

There is nice programming software available like this one:
http://www.ic-prog.com/ FOR FREE....

There are compilers available like this one:
http://www.melabs.com/pbpdemo.htm or this one:
**broken link removed** FOR FREE

All these are great for the beginner (and the not so beginner)! I still think the BASICstamp ( http://www.parallax.com/detail.asp?product_id=28803 ) is the best way to get into it though.
 
hyedenny said:
Hi George L,
You can build your own programmer VERY easily. Heres one that Ive used for a long time:
**broken link removed** (ignore the "16f84" - its the same for the 628 and many others. Just check and match the pinouts) the cost? Look in your junk bins, or UNDER 3 DOLLARS....

However, you should be VERY aware, that the design is a JDM varient, and dependent on your serial port exceeding the RS232 spec - so it will work on some computers but not on others!.
 
Hello,

just a few questions,

on the schematic, what is JP1 for, what does it do there?

also, is there a way to check with a multimeter if my serial port will support the programmer?

thanks,

George L.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top