Learning PIC - where to start?

Charles, do you know much about this board? I just looked it over and it is feature-rich. But one of the things that seems to really be a problem is the mikroICD. It appears that it may only work with their own software tools (not good, in my case) and I can't even tell if I can use assembly coding only with it. They specify the compilers, but not the assembler. Also, if I were to use it to program target boards I make where I write my code using Microchip's C compiler, would that be possible? I haven't yet seen a definitive answer, but what I have seen concerns me a lot about that.

Thanks, Jon

Reply to
Jon Kirwan
Loading thread data ...

formatting link

The Debug Express costs the same as the PICkit 2 starter.

Reply to
Robert Baer

How does a PIC conform to the +/- 15V RS-232 specs with only a single

+5V supply?
Reply to
Robert Baer

want

A MAX232 works well, and a PIC can bit-bang the RS232 async protocol reliably. I suspect that is what he meant. Some of the larger PICs have built-in UARTs, which makes it even easier.

Regards, Bob Monsen

Reply to
Robert Monsen

d"

PCs

will want

le

Hi I sure I will get howled down, but have you looked at Picaxe. I use them and there is a lot of information about them. I started with a

08M kit and have 4 articles designed for school children which got me started 2 years ago. Tony
Reply to
freddie

On a sunny day (Sun, 22 Feb 2009 21:38:36 -0800) it happened Robert Baer wrote in :

want

PIC itself does not, but I have a little board with a MAX232 and 5 pin header that I can plug in my PIC projects, that does level translation to 5V. For one of projects that need the interface permanetly, just add a MAX232. The 3 $ does not make any difference on the total project costs.

Reply to
Jan Panteltje

On a sunny day (Sun, 22 Feb 2009 23:45:04 +0000) it happened Nobody wrote in :

So that will be no problem then.

There are 8, 16, and 32 bit PICs. Your best source of information is the Microchip website:

formatting link

PIC is not very high frequency, the max clock is 50MHz IIRC, and the I/O you use will be slower (fc / 4 is the internal clock), so most wiring will work, even if quite long.

Yea, well as long as I have a par port somewhere.. I like par ports, so many I/O pins :-) But as I rewrote the programmer code so it would work on ever faster PCs, I can port it to a serial port too. As somebody else pointed out, and this is nice for those in .nl especially,

formatting link
has some nice PIC stuff.

As far as in circuit programming goes, I have that noppp programmer, and just solder the project via flat cable to it, the PIC never leaves the programmer. the programmer has sockets for 8, 18, and 20 pin DIL PICs. I recently added a switch so I could use the clock and data lines in projects without interference from the connected programmer hardware. Especially when using the 16F690 analog comparator input. When all works, and a board is made, unsolder the project from the programmer. Some consideration will have to be given to the resistor values at the prog data and clock lines, and I always leave the Vpp (programming voltage) pin free, do not like 12V on other parts of the circuit, but it can be used too, only as input or reset I think.

So, I guess everybody has their own way of doing it, judging by the reactions here, sometimes with 100% opposite opinions. I am sure you find your own, but for me, being able to leave the PIC in circuit while testing and programming saves on PIC pin damage..

Reply to
Jan Panteltje

Yes I know. The thing is it's SMD with the starter board he can insert other PIC's in the socket.

The majority of tutorials on the net also have to do with the starter board. That's why I suggested it.

Reply to
Hammy

Alternatively, you can put a USB to serial bridge chip in your project. A little more expensive than a MAX232, and does require drivers on the PC side, but I really like it anyway.

I have tried the CP2102. It works well, but the handshake signals are opposite logic of what you might expect.

The FT232R also looks like a good candidate, but I have not tried it yet. It allows you to choose between positive and negative logic for the handshake pins.

--
RoRo
Reply to
Robert Roland

Jan Panteltje wrote: (snip)

(snip)

I whole-heartedly agree with that philosophy but not with the uC. While the 16F84 is nice, the 16F628 and F628A obsoleted it, so the F84 and F84A became quite expensive.

There are lots of PIC16Fxxx. Take your pick (pun intended). I like the F628A for small footprint and several I/O's, the F887 for more I/O.

I do use MPLAB for assembly and simulation. I, too, use the NOPPP (No Parts PIC Programmer). (For burning 16F877 w/ NOPPP I wrote my own code in BASIC PDS.)

All of the chips I've mentioned are code compatable. IIRC :-)

--
Michael
Reply to
Michael

The Velleman PIC programmer I bought years ago states clearly in the instructions that it won't work with a USB to 232 converter.

Reply to
ian field

On a sunny day (Mon, 23 Feb 2009 16:46:29 -0000) it happened "ian field" wrote in :

Naa jaa use an other programmer then.

Reply to
Jan Panteltje

Quite a few of the simple, inexpensive chip programmers don't have provision for an external power source. They depend on being able to "rob" power from the RS-232 interface (typically from the output-handshaking pins e.g. DTR and RTS), and their circuitry depends on their being able to get a high enough voltage from the pins. The PIC chips typically require as much as 13.5 volts in order to program their internal EEPROMs/flashes.

These programmers will typically not work correctly when connected to a "fake" RS-232 interface - i.e. one which simply uses TTL/CMOS- compatible voltages (0 and 5) rather than swinging at least 8 or 9 volts above and below ground.

Most USB-to-serial dongles use 5-volt signalling (since their power is derived from the 5-volt USB bus). Many laptops also have low-voltage serial interfaces. Port-powered programmers usually won't work with either.

More complex programmers either use a separate power supply (e.g. a

15-volt "wall wart") or include a voltage-multiplier circuit. I believe that the PicKit 2 and its clones use the latter approach.
--
Dave Platt                                    AE6EO
Friends of Jade Warrior home page:  http://www.radagast.org/jade-warrior
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!
Reply to
Dave Platt

I have used the old PICkit 1 for many small projects, and I like to use the PIC16F684, which is 14 pin and has a PWM output, EEPROM, and other features at a low cost. The PICkit 2 apparently has some debugging capability, but I like the ICD 2 and MPLAB. If you damage the ICD 2, you can request a replacement, and they will send you one practically overnight at no charge. That is worth the extra cost for the genuine article, and they sometimes have package deals for 1/2 price.

I am now using the PIC18F2450 and related parts, which have a USB interface that is easy to implement with minimal external components. They have a USB Framework, or Stack, that takes care of the low level stuff, and with their PICDEM FS USB module (about $40) you can implement various USB peripherals such as HID (mouse, keyboard), CDC (serial port), and mass storage devices. There is also a bootloader so you can just create a hex file in MPLAB and have the module load and run your new firmware through the USB port as a virtual COM port.

And the PIC18F parts have a rich instruction set, lots of flash memory and RAM, and are particularly suited to C programming (I have the Microchip C18 compiler). If you have room on your board and if a $6 part is in your budget, it is a good choice. It comes in DIP and SOIC, which are easily hand soldered, and even the TQFP-44 with 0.8 mm pitch can be hand soldered.

Paul

Reply to
Paul E. Schoen

The Velleman K8048 programmer has a power jack marked 15V, this feeds a

78L12 and a 78L05. It would have been a simple matter for the designer to have made the unit fully RS232 compliant and/or suitably powered when connected to a pseudo-232 from USB adapter.

AFAIK the incompatibility with a USB to RS232 adapter is due to cheap & nasty driver software.

Reply to
ian field

"ian field" schreef in bericht news:LsEol.23055$ snipped-for-privacy@newsfe21.ams...

That Velleman kit does not contain a UART or similar serial device at all. All serialising and timing is in the PC-software. An RS232-USB converter will destroy the timing so it makes the programmer useless.

petrus bitbyter

Reply to
petrus bitbyter

So an RS232 programmer that could work on a USB adapter would most likely be considerably more expensive than a native USB programmer.

My original point was that since newer PCs don't have RS232 or LPT ports its best to avoid programmers that use these ports, in case you've forgotten what the argument is about - someone suggested using an RS232 to USB adapter, which in many cases won't work.

Reply to
ian field

On a sunny day (Mon, 23 Feb 2009 22:57:06 -0000) it happened "ian field" wrote in :

The right solution is to use a PIC in the programmer. I think this is what

formatting link
does:
formatting link

It is so obvious to use a PIC , and then have the timing independent of the PC, that I did not even mention it. Also the serial pass through is a nice idea. I do not have that programmer, or ever use it, but the idea seems sound to me.

Reply to
Jan Panteltje

The PICkit 2 is much more versatile than the ICD2. Not only does it do in-circuit debugging, but it can power your circuit with a software programmable voltage, and act as a field prorgammer and logic analyser. I sold my ICD2 and have changed to the "cheaper" PICkit2.

Dave.

Reply to
David L. Jones

I evaluated it (only based on bang for the buck) for a company that was considering entering the PIC development market. When we looked at its features and cost, we decided to run away!

The LCD could be a problem. I don't have any more to offer about that or other possible problems.

The value still impresses me. I would try one if I were developing PIC products.

Reply to
Charles

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.