Please help me select an appropriate processor

Twenty years ago I built a gadget based on a Zilog Z8 8-bit processor and a

2716 Eprom. I want to re-do the entire design using a more modern chip -- preferably in the PIC family (a DIP device that so I can wire up the board on the kitchen table).

The software was written in assembly language, and I was proud that the code was tight enough to occupy less than 1K. It also requires about 50 bytes of variables (scratchpad registers).

On the hardware side, it requires a real-time clock (with prescaler, it generates 1 msec interrupts) and only one input line and 8 output lines. Blazing speed is not necessary (the Z8 was clocked at 8 MHz.)

I know these are fairly modest requirements. The biggest problem was that the Z8 was a power-hungry NMOS device and is probably obsolete now. I still want to use assembly language, so I'd like to avoid BASIC-Stamps.

Any suggestions for choosing an OTP DIP (or SIP) device? Thanks in advance.

Reply to
Rapscallion
Loading thread data ...

You might want to think about the 8051 as you will probably find it much easier to get to grips with its assembly language if you are familiar with the Z80. The PIC is odd to say the least, even to the point of using the word file to mean register.

Ian

--
Ian Bell
Reply to
Ian Bell

If you don't specifically need an OTP, flash has become rather popular. That would allow you to reprogram without having to (re)buy more chips. I'd probably recommend avoiding the Microchip PIC families, unless you actually enjoy a little self-flagellation when writing assembly (as I do.) Also, there are other families with better programmers and debugging facilities at much lower cost.

Another modern change is that many micros do NOT need an external oscillator to operate and/or accept a modest valued resistor to set the speed. If you can accept some "tolerance" on your 1ms timing, you could also consider using some CPUs without a crystal. Some of the Cygnal devices claim a +/-2% tolerance on their ring oscillator over temperature and parts, if memory serves, but they are generally expensive parts (however, their "getting started" kits aren't too bad.) Some other chips vary much more widely, though. You'd probably need to say what precision you require for your timing to get some specific suggestions.

DIP does eliminate some choices, though. For example, I don't think those Cygnal parts are available in DIP. The same is true for the Texas Instruments MSP-430 -- no DIP. This means Microchip PIC and Atmel AVR and Motorola 908 'Q' family and some 8051 incarnations (such as Atmel's) that I'm sure Jim Granville will be happy to discuss. When I think of DIP, I'm usually using Atmel or Microchip, though. And of those, I'd probably recommend Atmel's AVR, since there is a very nice development/programmer board available at fairly low cost with LEDs and pushbuttons and a bunch of sockets for various parts, plus the software to make coding and testing darned easy without working at it.

Which makes me curious... Is there a DIP packaged CPU (hopefully a line of CPUs) that is flash programmable, includes something equivalent to jtag debugging and programming, and includes a relatively inexpensive programmer/debugger board (with proto area??)? Something along the lines of the Cygnal 8051 or TI MSP430 lines, but in offered in DIP?

Jon

Reply to
Jonathan Kirwan

The Z8 is still made, it's in CMOS now.

Leon

Reply to
Leon Heller

But you did not check ?

formatting link

Z8 is very alive and well...

Reply to
Jim Granville

the

Cygnal do have the F330 in DIP20 (8KF/ADC), and the Zilog Z8 Encores's have DIP variants. There are other C51's comming with On Chip DEBUG and DIP/PLCC.

-jg

Reply to
Jim Granville

How many port pins do you need?

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Cygnal hasn't been DIP in my mind. Have they started putting out DIPs? I'll have to look. (They were too darned expensive, though.) Thanks.

Jon

Reply to
Jonathan Kirwan

Sounded like 9. Hehe.

Jon

Reply to
Jonathan Kirwan

Ah, yeah. Okay. How about a PIC16F628A. 2K x 14 of code meory, 224 bytes of RAM and 16 I/O in an 18 pin DIP etc. 1.78 in 25's.

Or, cutting it a bit closer, a PIC16F630. 1K x 14 of code memory, 64 x

8 RAM and 12 I/O in a 15 pin DIP etc. 1.27 in 25's.

If you want a bit more horsepower and less worrying about bank select bits, the PIC18F1220 with 2K x 16 code memory, 256 bytes of RAM and

16 I/O in an 18 pin DIP etc. 2.94 in 25's.

All the above are flash-based, not OTP, which is better, IMHO.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

The F628A is very nice and popular and cheap. A good choice where a lot of folks have already beaten down the brush and made nice, easily walked paths.

15 pin DIP? Cripes, I must have missed out! ;)

I've a tube of the F1320's laying around for playing. Good DIP part for most anything.

But all this is PIC and finding a nice emulator/jtag is expensive (ICE 2000 ain't cheap, though I have one here.) I was wondering about something else in DIP with built in JTAG debugger/programming and excellent tools, etc.

With flash, there is always the internal functional units needed to erase -- such as charge pumps, etc. And the cells are somewhat different, as well. With OTP, there are no facilities for erasure... or programming. No charge pumps, no write logic, etc. Meaning... supposedly, it's said... a little more security that something in software or some soft error caused by a cosmic ray turning on the charge pumps won't cause trouble. (No idea, if it's just paranoia. I'm too ignorant of the details to be certain.)

Jon

Reply to
Jonathan Kirwan

Yes.

  1. ;-) Maybe cutting it too close.

Those flash units have background debug, which you can use with the ICD2 for a reasonable price, I think it's around $150 if you pay full price- lets you single step and so on (even inside ISRs) from inside MPLAB. Since you don't want a compiler, the free tools should suffice, especially for just ~1K of code. Between the single breakpoint of the ICD2 and the MPSIM simulator, doing a 1K job should be pretty easy.

It eats up some resources including a few port pins and some code and data memory- see the data sheets etc. for the gory details.

Yes, understood. It is something I'm VERY concerned with, but I've not seen, nor heard of, a problem. I don't enable low voltage programming ever in production units. The programming mode thus requires a high voltage on /MCLR Vpp pin, either to do the programming or to enable it.

Microchip has been fooling with using a code to enable programming and having LVP enabled full-time as I understand it, on some newer units. Not sure I trust it. The code is the ASCII for their ticker symbol.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

SiLabs web info is not super-clear, and they also seem to be in transistion from a C8051F330P [DIP24] to a C8051F330D [DIP20] for DIL/low volume use.

Still, Mouser show both in stock, with the 330D @ $4.27/100, so it is more expensive than the jellybean PICs, BUT it has the on Chip DEBUG, and 8KF/768Ram/PCA/SPI/10bADC and 25 MIPS core - ALL in a nice DIP20 package :)

Another option for testing/low volumes, is the C8051F064EK, which is a surprisingly low cost ($25) Module, with serious ADC and Dual USB.

With

no

too

There are some market sectors that stipulate High Voltage or Hardware enable on FLASH, and there is also a trend to offer new uC in FLASH _and_ ROM models, and I suspect it is not _just_ price, but also the improved field reliability, that drives this move.

These devices are called ROM, and sold as ROM-flows, but may be flash die derivatives, with faster test flows, and erase disabled.

-jg

Reply to
Jim Granville

If what you need is a small, easily reprogrammable (without an expensive programmer) microcontroller in DIP, I would suggest you to look at:

- Motorola (currently Freescale) MC68HC908QY - programmable via serial port

- Atmel ATiny series - programmable using SPI

- PIC 16Fxxx - SPI(?)

Reply to
Grzegorz Mazur

Rapscallion

A Z8 should be available for a fairly direct upgrade. The classic Z8 architecture was still available the last time I looked and should be compatible with your old device. After cornering a large segment of the TV controller market, they consume very little power and most have a power down mechanism to consume less.

The great thing is your code should load fairly directly and event cycle times should scale or be constant with the same clock frequency.

This should be a non-issue upgrade.

Reply to
c tango

the

Freescale MC9S08GT16 and ST7263 are two that we've used that come in DIP - the only hitch is they use a 70 mil pitch "Shrink DIP" package. I think their respective demo boards use the SMT version.

PIC18F, Philips 89LPC and some of the Atmel ATmega stuff is in DIP, also.

Reply to
Andrew Dyer

Thanks to all who replied. Please bear with me because I am a (dare I say?) hobbyist. Is that the sound of doors slamming :)

I'm happy to hear that the Z8 is still kicking, and in CMOS. I'll probably need an external xtal because timing is fairly critical -- the application in fact measures time intervals and must have at least 0.1% accuracy.

Yes, I think I need 1 bit input plus 8 bits output. The outputs have to drive three 7-segment LED digits w/ decimal points. So I use 3 digit select lines, 4-bit BCD data, and one bit DP, making 8 output lines in all. I suppose I could use a 1-of-3 selector to decode just 2 lines, but I hate to add an extra chip.

If I only needed 8 I/O lines instead of 9, would that open a lot more options?

Reply to
Rapscallion

the

Yes, but you missed the question, then. I'm talking about including jtag debugging through an inexpensive adapter to a PC. In other words, something where the toolset allows me to use a tiny header on my target board to quickly compile, download to flash, and single step or run to breakpoints. PIC18F won't do that, as I know from personal experience. I do have an ICE 2000 emulator probe for the 18F, but then I can't have the actual target board -- I need a socketed arrangement because the actual CPU cannot be there. I don't know about the ATmega, having only used the smaller AVRs -- but those AVRs are NOT single step or run to break. Nice programming board, though. I like it. But not the same thing, really. Re the freescale, I cannot say -- I'll have to look. But given that you didn't get one (or maybe two) right, I'm not sure you understood when adding that one, either.

Thanks for the reply, though.

Jon

Reply to
Jonathan Kirwan

Are you planning on using a BCD to 7-segment decoder/driver, like the 7447, to generate the display segments? One thing you may not realize is that on these newer microcontrollers, at least some of them anyway, their sink and source capability is almost decent for LED driving, even when multiplexed. Sink and source impedances of 70 ohms or so are possible and if you open that up to around 120 ohms or so, a number of them fit the bill. If you want repeatable appearance, regardless of the number of digits, you'd need three transistors, but I've actually just used a pin (or two) to provide the common anode or common cathode drive with decent results in three-digit systems. Also, some of those

7-seg displays look pretty decently bright on only a few mA (say 2.5mA using a 680 ohm resistor for each segment, but then muxed by 3, so 2.5mA/3 or about 0.8mA average -- the current variance isn't so much with 680 ohm per seg.)

Jon

Reply to
Jonathan Kirwan

line of

lines of the

something

quickly

won't

emulator

a

about

single

not the

But

understood

The AVR Megas have jtag debugging, with single-stepping and (3?) hardware breakpoints. The official Atmel jtag debugger is pretty expensive, but there are cheap clones available from Olimex. AVRs are nice to work in in assembly (they are not nearly as C-friendly as their marketing stuff claims, although they are better than most 8-bitters).

Reply to
David Brown

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.