How to check 125 logic states...?

. . .

A PIC?

Somehow, I think not!

formatting link

Andy Wood snipped-for-privacy@trap.ozemail.com.au

Reply to
Andy Wood
Loading thread data ...

Maybe something a little more durable will be needed....

Reply to
AJ

Thanks Andy! I was going to politely reply that I don't need a PIC because this design's based on a Zilog Encore which works just fine. :-)

Cheers Bob

Reply to
Bob Parker

It's an interesting idea. In fact I was once working on a design for identifying wires in a cable which used a principle something like that, with groups of resistors at the far end. In this case, I already have a working circuit board based on a nice Zilog Encore micro, looking at 50 lines with 7 x 74LS165s. I've been asked to increase that to nearly 130 lines and I was looking for the simplest way to make the change without radically changing the rest of the design. Some useful design ideas have popped up during this discussion. :-)

Regards Bob

Reply to
Bob Parker

Any possibilty of simply stacking 3 of the existing boards?

Dave :)

Reply to
David L. Jones

We could do that, though it would make it hard to see the alphanumeric LCD module and push the buttons on the bottom two. ;-)

I think Brenden was right - simply string together as many readily available cheap simple 74HC165s as needed (16).

This little discussion's thrown up some interesting ways of solving this unusual problem. :-)

Bob

Reply to
Bob Parker

:-) I was wondering much the same about the popularity of PICs myself... I think that's why most people program them in C.

--

Bye.
   Jasen
Reply to
jasen

Hi Jasen, I think you're right. Probably the only way anyone could tolerate the PIC instruction set would be by using a higher level language to figure out an appropriate sequence of instructions. I've only ever written assembly code. Tried to get into a couple of C tutorials but I don't feel comfortable not knowing what's happening down at the 'nuts & bolts' level of the processor. The reason I did that web page was because I think that like a certain American soft drink whose logo is also red and white, PICs are popular because of great marketing which has produced a 'cult' following, not because they're a better product than others which are around. Let the flaming begin....

Bob

Reply to
Bob Parker

The reason I moved from years of experience in R&D microcontroller development to marketing, was because of the PIC instruction set. At the time, I thought it may have been my advancing years.

To me, there was no longer any joy in assembly if you used a PIC. Gave it away about 1995 when I wrote my last lump of code in anger. I have spoken with Bob on this subject in the past, and like visiting his

formatting link
page. A good reminder for me. :-)

BUT (always a but) PIC has a very big following, and good higher level languages are available that make the instruction set virtually invisible.

Don...

Don McKenzie E-Mail Contact Page:

formatting link

Crystal clear, super bright OLED LCD (128x128) for your microcontroller. Simple serial RX/TX interface. Many memory sizes.

formatting link

Reply to
Don McKenzie

Programming in high level language definitely makes using PICs a lot easier (and pleasant). There is always a concern that the code is less optimized or apparent lack of full control of the code but I have looked at the assembly output of some of my projects (the ones that did not run first time so that would be 100%) and really compiler produced code is not that bad although I found the resultant code size varies wildly between compilers. However, as long as the code produced is correct and you application is not timing or space sensitive one it really doesn't matter if you use up 50% of the code space or 55% of the code space since you're paying per chip.

As for great marketing, I don't know how much Microchip did to promote PICs but one thing they did do right - the chip is easily obtainable and reasonably cheap which is not the case for the comparable competing 8 bit MCUs. It is a fair bit harder to get Atmel or MCP430 MCUs (although nowadays I found Dontronics and Futurlec stock those). As a result, although competing MCUs have nicer ISA and they have free compiler toolchains (I think one can get gcc for Atmega, MSP430 and ARM) while PIC doesnt really have a good free C compiler, PIC is more popular than the others. Because of that there seem to be more resources on the net related to PICs (programmers, projects, code snippets) which no doubt catches peoples attention.

Eugene.

Reply to
ER

All good points. My problem is that often the timing is important, plus I tend to underestimate how much program memory I'm going to need, and design around a chip which doesn't have quite enough. Some of my projects have used all but the last ~30 bytes of memory. :-) Certainly Microchip have done their homework and made devices and support readily available for people just getting into micros, knowing that they probably won't change to another architecture/brand once they're used to using PICs. Other companies have aimed for professional users, so no-one else uses them and new users never hear about them. I'm using Zilog Encore micros now. Zilog are making their full Development Suite which includes a full C compiler available for anyone to download. See

formatting link
The Encore is a good flash micro family with OCD and simple single-pin interface. It's a shame it's not better known.

Bob

Reply to
Bob Parker

I can't disagree with any of that, Don. :-)

Cheers Bob

Reply to
Bob Parker

formatting link

It is a good move by Zilog to offer their development suite and C compiler free. It should help them in a long run, having a free C compiler is nearly an expectation on 32 bit architectures now and I think it will tend to go that way in smaller MCU area also. I wonder if the 8bit devices will eventually all be replaced by 16 or 32 bit parts in the future. Seems an overkill but low end ARM chips are cheaper than ever and with the speed at which semiconductor technology moves forward it is hard to make a definite prediction on anything without fear of being proven utterly wrong (ala infamous Bill Gates quote that noone will need more than 640KB RAM).

Eugene.

Reply to
ER

Get yourself an MSP430 and you'll rediscover the joy, if not the youth :-)

Reply to
Clifford Heath

Can I ask a question as to why people think PIC asm is so bad? I think it is the same as any RISC uP. Zilog and the other z80 derivatives have a lot more instructions, thats about it.

C and c++ is a veeneer for ASM. Thats it. I had no problem with pic asm, but I am lazy these days and I dont think I can be arsed playing with asm. C and C++ reduces the amount of code.

Reply to
The Real Andy

I think everyone's got their own individual way of programming a micro to do a particular task. Sort-of like artists all having their own style. I've got a mate who absolutely loves PICs and he does some pretty good stuff with them in asm. Over a beer we sometimes talk about our different approaches. I can't understand his patience in using a (very) limited number of instructions, and he can't understand me "having to learn all those instructions... what are they all for and why would you want them???". Don with his background in Z80-based systems seems to have the same kind of mental processes as me, but plenty of others here are like my mate. I don't think anyone's right or wrong. :-)

Cheers Bob

Reply to
Bob Parker

I seem to recall that Bill also said that e-mail spam would be a problem of the past by 2006. He probably shouldn't give up his present job to become a clairvoyant! You only need to look at how the prices on USB memory sticks are dropping to see the trend towards putting more and more active components onto smaller and smaller bits of silicon. It mightn't be all that long before 16 bit micros are everywhere, followed by 32 bit ones, pushing 8 bit devices into the background and maybe into history too.

Bob

Reply to
Bob Parker

Nice thought Clifford, and I'm sure you are right, but I think I changed direction too long ago.

I am one of the people after 25 years with the same company, (TABCorp) about 7 years ago, I literally told my boss what he could do with his job. One of the best decisions I have ever made.

I can understand Bob's love of the Zilog family. All of my first micro projects were all done on a Z80. With undocumented features I discovered in some instructions, I was able to interface up to 64Mb dram to the Z80 with only 2 TTL support chips, and had to refresh the drams at a constant minimum timing, else they dropped their bundle. Z80 memory map range is quoted at 64K.

Documented at:

formatting link
for interested parties.

MSP430 is something that is gathering momentum, and will give PIC and AVR families a big shunt.

Bob's beloved Z8 Encore I'm sure I would have loved also, but again, my development years are far behind me.

Don...

Don McKenzie E-Mail Contact Page:

formatting link

Crystal clear, super bright OLED LCD (128x128) for your microcontroller. Simple serial RX/TX interface. Many memory sizes.

formatting link

Reply to
Don McKenzie

C'mon Don, You know what they say about riding bikes.... :-)

Bob

Reply to
Bob Parker

The top quality PIC C compilers (like HI-Tech) generate very space efficient and fast code.

If the reason you are using assembler is to squeeze your program into a specific chip, then you have chosen the wrong chip.

Professional microcontroller work is done mostly in C, with a small amount of in-line assembler where needed. The benefits of much faster development time, ease of code peer review, and code portability are massive benefits that only a fool would pass up.

The Microchip 18series PIC C compiler is available for free, with I believe one minor limitation on code speed and optimisation.

Dave :)

Reply to
David L. Jones

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.