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.

Newbie requests input, project advice!

Status
Not open for further replies.

Rian_Colorado

New Member
Hello all! I’m excited to know that there are forums in the world for darn near everything!

To open, I’ll classify myself as 98% green newbie. I’ve done some programming in the past (small amounts, mainly basic) and I had 1 semester of ladder logic/PLC’s, and about 4 weeks of exposure to PIC’s in my industrial engineering coursework in college. This occurred though 4 semesters of electronics exposure during my degree. I DO have some memory of circuit design, and old course books, so the design part I think I can get along ok with, or at least ask somewhat informed questions! I’ve designed some small projects, but understand that it’s been 8 or 9 years. That all being said, I’ve always been an automation junky, and I’ve decieded to start learning about this topic once again. I have a project in mind, and I would REALLY appreciate any input the more experienced members might have.

The first project I’d like to try has the following requirements. I think it’s a good starter project for re-learning PIC’s, but I’m totally lost on the equipment I’ll need so please suggest what you would recommend I learn with!

I need to design a circuit that:
Has 2 switches (these are going to be proximity sensors) these are 2 inputs
Has two outputs (momentary contact switches to activate doors) these are 2 outputs
Will function on a timed basis (ie, I’d like it to check the condition of either of the two switches, at varying times, similar to a sprinkler clock? and if they are open, then momentarily close the loop on the appropriate output)

I have the proximity sensors (magnetic reed sensors, similar to home security applications) and the outputs are set. I need a PIC that I can program that has internal time circuitry to function the rest of the project.

Please suggest:

A)Which PIC is best for this project, or perhaps best to learn on. I have no problem buying WAY more chip then I need in order to have the ability to program much broader things in the future as I learn. I prefer going EEPROM to learn/develop, then later I’d look into more inexpensive devices for any kind of mass production..

B)A device to program the PIC with (or write… burn…blow… however you want to say it) I’ve seen very simple “JDM” 16F84 programmer on e-bay for about 10$ but I’d prefer some recommendations!

C) I know it depends on the above to a degree, but what programming language / software would be best for me? Please keep in mind that I’m a beginner to a degree so cheap = increased interest! If I get more into it, I’d be much more likely to spend $$ on software etc. once I’ve discovered that I’m hooked!

d) Any reference material/books that you think someone at my level would benefit from. I’ve purchased one (PIC in practice, D.W. Smith) but I’d love qualified opinions :)

Thank you all for ANY input you might have I’m looking forward to learing again!

Rian
 
I just got into PIC programming a few weeks ago, so I know exactly where you're at (I'm also an Amateur Radio operator).

These days the flashable PICs are so cheap there's no advantage cost-wise using OTP PICs. I'm using a PIC12F629 that I bought for $1.59, and I've reprogrammed it dozens of times developing this software.

The classic JDM programmer has problems with some of the newer PICs (PIC12F629, PIC16F628, etc). Once you write a program to the PIC, depending on various settings (MCLR + using internal oscillator), the JDM programmer can't write a new program to the PIC. There are some modifications that can work around the problem. However instead of hacking up my JDM programmer I tried the **broken link removed**. So far it has worked great with the 12F629, however it cannot program OTP PICs like the classic 12C508. It is compatible with the JDM programmer, so it works with the exact same settings in the programmer software.

ASM is probably the best way to go, if you've got a few days to spare familiarizing yourself with it. There are only around 35 instructions, so it is not bad to learn. The "problems" I've run into with PIC programming have nothing to do with using ASM compared to say C or BASIC, but just general lack of familiarity with the PICs. For example, if specific IO pins are comparators, then you have to set a flag to allow them to be used as standard digital IOs. Another problem I ran into today was that I couldn't get GP3 to work properly as an input using an internal pull-up. Well, I finally dig deep in the datasheet and find that GP3 has some restrictions (it is an input-only pin, and it does not have an internal pull-up). Regardless of the language you use those types of issues have to be resolved.

I've gotten all my reference from the datasheets, and websites like **broken link removed**.

Dan East
 
For the programmer, get a device with its own power supply, like a P16PRO40 kit, or make it yourself (www.winpicprog.co.uk)...

JDM tends to give problems on some computers.

As for the chip, a PIC16F628 is the best way to go for a beginner. It's a pin compatible chip for the 16F84, wich means you can run all programs designed for the 'F84 on a 'F628 wich only few modifications.
But the 'F628 has twice the program memory, more RAM, and hardware serial port and a built in 4Mhz oscillator (no need for crystal, saves 2 IO pins)... Best of all, it's cheaper then the 'F84

Then you should learn the pic's assembler language. A complete IDE with built in assembler (MPLAB) can be downloaded for free from microchips site. Assembler is the 'native' language of a microcontroller and assembly programming is not always as easy as using C or basic. But you need an understanding of assembler anyway before you can use C or basic to their full extent...
 
:wink:

Just a quick note on programmers, when programming the newer "low voltage enabled" chips like the 628 etc, make SURE that the low voltaeg programming pin is pulled LOW not left "floating" this will prvent alot of newer chips being programmed...

So.... for the 628, make sure pin 10 on your zif socket (underneath :wink: ) is connected to pin 5, the 877 will be pins 31 to 36

Another problem I encountered when programming 876/7 based smart cards was that the pic really needs a good few Milli Seconds to reset from a PGM->0V state with no load. As it may be difficult or impossible to change the PC software, try adding a resistor across VDD and VSS and MCLR and VSS (10k ish?, experiment!) to help load the pic between programming cycles.

Hope this helps!
 
**broken link removed**
Check this out, this is what I have, **broken link removed**, it will program anything you need now and in the future,8x5x, AVR, PIC, EEprom, SPI,I2C memory, PLD,can be used as CMOS/TTL/SRAM IC Tester.
In case you need more power, dont spend your money on $50 programmer.

**broken link removed**
The 2nd best choice is **broken link removed** from the makers of PIC,
**broken link removed** device programer will programm all "or almost all" PIC chip, some may need an adapter, unfortunetly only program MICROCHIP MCU's

JDM is killed my mother board, the RS232 driver chip blow up, I don't againts it but I'll not recomend it, I konw some of you gus have burnd 1000x with it, vell my Mother board is cost more than the programer I bught...

About the developer software, if you not ready to spend $2-300 for a BASIC or C compiler the you should use
**broken link removed**from Microchip, free and is the best ASM code dev program I used.


PIC16F628 is a god choice, check the,DATASHEETor **broken link removed** for info.
HELP

STEVE
 
I've also heard that Zilog's Z8encore kit is very good. The adventage is that you don't have to build anything to get started - it works right out of the box and has external connections so you can hook up your external circuits. This will let you figure out the basics before you tackle building your own stuff. It also comes with a C compiler. Its a good deal at $39.

Brent
 
Hi
I toke your advice, since my MCU life started with a Z80 back in 1987, lest give a try again.

Ordered yesterday arrived today !!???
Extremely good setup all I need is to write my software and upload, ICD works great.

64K flash, 4k RAM, 60 IO, 4x 16bit timer, 12x10bit ADC, 2 UART , I2C, SPI
free code developer software for C and AMS, free product support and software update !?!
all for $39+$8 for shipping.
wow
 
PGM?? 1 6f877a

Matt(Pic progger) said:
:wink:
Another problem I encountered when programming 876/7 based smart cards was that the pic really needs a good few Milli Seconds to reset from a PGM->0V state with no load. As it may be difficult or impossible to change the PC software, try adding a resistor across VDD and VSS and MCLR and VSS (10k ish?, experiment!) to help load the pic between programming cycles.

Hope this helps!


I've been working with the 16f877a chip. For some reason, I can't get Port pin B3 to work as an output pin. This pin is also PGM. Where should I add the resistor accross VDD, MCLR, VSS? on my circuit or the programmer circuit?
 
You should disable the low voltage programming fuse in the configuration word if you want to use RB3 as digital IO. But then you can no longer use LVP
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top