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.

Need advice: which are the most recommendable 8 and 28 pin PIC micros?

Status
Not open for further replies.
Nigel Goodwin said:
No requirement for a hardware serial port, it's trivial to do in software - and PIC's were commonly used for that exact model railway purpose many years ago.

I agree with your OTP stance, not worth the bother!.

And without hardware serial it is trivial to do in hardware, Nigel. It just takes more wires... I was actually looking for justification for YOU. You see, I can do it in HW with 3 wires. I can do it with a UART with two.

If a railroad hobbyist simply wants to control some lights, He sure as hell does not want to learn to program ANYTHING on top of learning to read schematics and solder if he does not HAVE to.

D.
 
cadstarsucks said:
And without hardware serial it is trivial to do in hardware, Nigel. It just takes more wires... I was actually looking for justification for YOU. You see, I can do it in HW with 3 wires. I can do it with a UART with two.

I get the feeling we're talking at cross purposes?, why three?, and why two?, why not just one - regardless of hardware UART or not?.

If a railroad hobbyist simply wants to control some lights, He sure as hell does not want to learn to program ANYTHING on top of learning to read schematics and solder if he does not HAVE to.

Never said they did, PIC based modules were freely available ready made or as kits - as replacements for the discontinued commercial ones, which they were fully compatible with.

However, I notice this time you said 'lights', presumably what you were talking about all the time?, I was talking about the trains themselves.
 
Nigel Goodwin said:
I get the feeling we're talking at cross purposes?, why three?, and why two?, why not just one - regardless of hardware UART or not?.



Never said they did, PIC based modules were freely available ready made or as kits - as replacements for the discontinued commercial ones, which they were fully compatible with.

However, I notice this time you said 'lights', presumably what you were talking about all the time?, I was talking about the trains themselves.

Yes. Lights, switches, everything. I was going for a single wire comm link for model railroad control as a realistic small app for hobbyist to want to pursue and build, as opposed to electronicers who might be building for the sake of building and learning.

Something a newby would come in wanting help with. No knowledge, just a dream: control everything from a PC with little or no effort, aside for the simplest of wiring.

I was thinking of remote batteries, daisy chained data, a clock, and a ground reference line for simple shift registers or ditch the clock line and use USARTs with addressing. If the sub $2 PICs did not have USARTs that defeated the purpose, which was to find an actual hobbyist app that I considered cost effective to use PICs. If I still needed the clock line it is more cost effective and much easier on someone of that caliber to just daisy chain shift registers.

D.
 
I don't see your requirement for a hardware USART?, which some of the cheap PIC's have anyway, but it's so trivial to write a software UART - which also means you can do it exactly as YOU want, not hampered by the RS232/serial spec.

However, I think you'll find that it's all been done before, and a LONG time ago as well.
 
I agree with Nigel and don't see the need for a hardware UART. A bit-banged UART can easily support a half-duplex open-drain 1-wire bus (with ground). Heck, splurge and use an extra wire to power all the slaves through the daisy chain.
 
Last edited:
Mike said:
I agree with Nigel and don't see the need for a hardware UART. A bit-banged UART can easily support a half-duplex open-drain 1-wire bus (with ground). Heck, splurge and use an extra wire to power all the slaves through the daisy chain.

True, but at that point why not just use simple shift registers an not have as much programming. All that would cost is, as you say, an extra wire.

D.
 
cadstarsucks said:
True, but at that point why not just use simple shift registers an not have as much programming. All that would cost is, as you say, an extra wire.

The main reason, which as a micro-controller user you already know, is versatility - doing it with micro-controllers gives you so many more options.
 
I would either bit bang it or get a MPU with a hardware UART.

By the time you add the shift register, maybe a socket for the shift register, the bypass cap and the board space you may as well just buy a PIC with a UART.

If you want to use a compiler and do not own one, picking a chip based on what can be had for free makes sense.
 
Last edited:
Nigel Goodwin said:
The main reason, which as a micro-controller user you already know, is versatility - doing it with micro-controllers gives you so many more options.

True but many are not interested in the options, only a means to an end.

D.
 
3v0 said:
I would either bit bang it or get a MPU with a hardware UART.
By the time you add the shift register, maybe a socket for the shift register, the bypass cap and the board space you may as well just buy a PIC with a UART.
Which makes no sense in the context of a remote switch.
If you want to use a compiler and do not own one, picking a chip based on what can be had for free makes sense.
And most micros have complete code size limited tool chains available for free...so what should you then base your choice on?

D.
 
pasanrobotics said:
at the moment I'm using 16F876A chip for a clock
Did you have it to spare? Is it a hobby project, or production?

I fail to understand the logic of an $8 when a $2 one will do, unless you have them for free for one or two pieces. Mind you, the least expensive PIC at Digikey is the PICF675 at $1.75, which is darn close to the Luminary LM3S101 ARM price of $2.25.

The only reason to jump up that high is for the external oscillator. A 1% internal oscillator will be off up to 15 minutes per day. For a science fair that might be ok but for actual use it is not. If you are using the line as a timebase, you could get away with a $1 PIC.

D.
 
cadstarsucks said:
Which makes no sense in the context of a remote switch.

I was attempting to point out that based on cost it made no sense to use external hardware (shift register) to fake a uart. Perhaps I took the posts regarding doing so out of context.
cadstarsucks said:
And most micros have complete code size limited tool chains available for free...so what should you then base your choice on?
D.
First if it has not been done I think we should start to compile a sticky thread about what free compilers exist and what their limitations are.

In rough order of importance:
  1. It has to support the chip.
  2. If there is a compiler you already have and know then there may be no point in looking further. This often trumps other considerations.
  3. The tool-chain and chip must support inexpensive ICD (In Circuit Debugging).
  4. It has to generate enough code for the app. I would look for at least a 50% margin over ones best guess.
  5. Sufficient libraries.
  6. Ease of use. Documentation.
  7. A user forum. If you can choose between two compilers, check their forum to see what the problems are and if people are getting help.
  8. If it is time limited that has to be understood.

Unordered list of things that do not matter much for non production/hobby use:
  • Size of generated code. You can buy a lot of memory for a few dollars.
  • Speed of generated code. Speed is cheap.

On the PIC side the Microchip 18F compiler is not code limited. It does turn off some optimization after 60 or 90 days. The 48Mhz PIC18F2550 with USB support and 32K bytes of memory is $5.92 from Newark. Attractive even if it is overkill for many apps.

3v0

Thanks again to the body who posted about Newark's price on PICs.
 
3v0 said:
I was attempting to point out that based on cost it made no sense to use external hardware (shift register) to fake a uart. Perhaps I took the posts regarding doing so out of context.
You got your threads crossed! (weak attempt at a joke) Actually what I was saying was that it is easier and less expensive to push serial data out to remote ICs than it is to use the caliber of PIC that would be entailed to gain the USART hardware.
First if it has not been done I think we should start to compile a sticky thread about what free compilers exist and what their limitations are.

In rough order of importance:
  1. It has to support the chip.
  2. If there is a compiler you already have and know then there may be no point in looking further. This often trumps other considerations.

  1. I agree. This comes under comfort zone in my book.
    [*]The tool-chain and chip must support inexpensive ICD (In Circuit Debugging).
    [*]It has to generate enough code for the app. I would look for at least a 50% margin over ones best guess.
    [*]Sufficient libraries.
    [*]Ease of use. Documentation.
    [*]A user forum. If you can choose between two compilers, check their forum to see what the problems are and if people are getting help.
    [*]If it is time limited that has to be understood.
Unordered list of things that do not matter much for non production/hobby use:
  • Size of generated code. You can buy a lot of memory for a few dollars.
  • Speed of generated code. Speed is cheap.
Again, I agree.
On the PIC side the Microchip 18F compiler is not code limited. It does turn off some optimization after 60 or 90 days. The 48Mhz PIC18F2550 with USB support and 32K bytes of memory is $5.92 from Newark. Attractive even if it is overkill for many apps.

3v0

Thanks again to the body who posted about Newark's price on PICs.
On the ARM side:
https://keil.com/demo/limits.asp
The only limitations are that you can not use it for commercial apps and a 16K code limit. It includes the assembler, compiler, linker, symbolic debugger (full instruction cycle and peripheral simulation, we use it here), target debugger both through JTAG and serial monitor, and integrated development environment. With no time limits. And on looking closer you can indeed just download it.

For $2.20 you get 2K of RAM and 8K of FLASH at 20MHz. At 32K of flash the Luminary start falling apart unless you also compare code density. At that price point the NXP (formerly Philips) parts have the disadvantage of being fine pitch but pack in 32K of FLASH and 8K of RAM at 60MHz.

I do not think it would be a problem for a hobbyist to work with the 50mil spacing of the LM3S1xx parts but the jump to the 20 mil on the LPCs would present a challenge.

D.
 
3v0 said:
First if it has not been done I think we should start to compile a sticky thread about what free compilers exist and what their limitations are.

In rough order of importance:
  1. It has to support the chip.
  2. If there is a compiler you already have and know then there may be no point in looking further. This often trumps other considerations.
  3. The tool-chain and chip must support inexpensive ICD (In Circuit Debugging).


  1. Some news on this. Yesterday the rep was here with some samples. I we got on the Luminary part and I groused about the situation, as I promised I would. I suggested a nearly free hobbyist kit-the micro mounted on a dip adapter board and headers that the hobbyist could solder on along with a CD of the dev SW.

    The discussion continued and while it is relatively easy to get the RS232 translators it might make sense to throw the parts in for that as well.

    He said that much of their staff are ex microchip PIC people so there is a good shot that they will go for it. He also said that considering typical add campaign costs that it might be worth their wile to do it for free.

    The upshot of all this is that there will likely be a "DIP" Luminary ARM hobbyist setup for under $10 in the near future.

    D.
 
16F913 with 7-Segment LCD's

Hello!

I'm trying to understand what is necessary to be able to "map" 2 discrete LCD's to the 16F913 using PicBasic Pro. Can you point me in the right direction on how this is to be properly done?!

Thanks, Frank :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top