Do you have a question? Post it now! No Registration Necessary

Re: How to check 125 logic states...?

Just an idea, but could you possibly use 16 x OP AMPS configured as summing
amplifiers with the inputs scaled to 1,2,4,8,16,32,64,128 (Im pretty sure
you can get resistors close to those values in 0603 packages from Farnell)
and feed the outputs into a PIC with 16 x A/D's like the PIC18F6720. With
the inputs scaled that way you should be able to calculate which individual
inputs are on or off according to the output voltage. This way you would
need about 150 resistors, a couple of OP AMPS and the PIC which you need
anyway, may work out cheaper in parts and might simplify your design and
layout but would probably be harder to put together.
Best regards
AJ

Re: How to check 125 logic states...?

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

Re: How to check 125 logic states...?

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
http://members.ozemail.com.au/~bobpar/pichate.htm 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: http://www.dontronics.com/e-mail.html
Crystal clear, super bright OLED LCD (128x128) for your microcontroller.
Simple serial RX/TX interface. Many memory sizes.
http://www.dontronics-shop.com/product.php?productid16%460

Re: How to check 125 logic states...?
On Sun, 12 Nov 2006 18:24:34 +1100, Bob Parker

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.


Re: How to check 125 logic states...?

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

Re: How to check 125 logic states...?
On Sun, 12 Nov 2006 20:26:35 +1100, Bob Parker

Lol, i know PIC asm and I know z80 asm. Beleive it or not I even know
the current intel instruction set!!! You think pic is bad, try intel
celeron etc!!! After that, PIC is a godsend!

I couldn't give a shit, I write software for whatever is put in front
of me. I just think that blatenly bagging one particular architechture
because one does not like is like a bad tradesman blaming his tools.
Each has pro's and cons, either outweighed by the job at hand.


Re: How to check 125 logic states...?

I fondly recall working with 6809s and 68000s. lovely, lovely
instruction sets. the intel stuff is pig-ugly by comparison. PIC asm is
also pig-ugly, but in a misshapen, dwarven kinda way.

often the biggest pro a particular micro family has is "I know how to
use these and their toolset". picking an unfamiliar micro/development
set can add a lot of time, hassle and cost to a project. I had the
misfortune to use the Hitachi SH2 and toolset for several years, and the
compiler *sucked*
I've worked with lots of different micros, but I generally dont write
any code, so it doesnt concern me much, although I generally have to
specify the code, which requires a reasonable degree of understanding of
the micro. as such my personal preference is for 8051 cores for weeny
stuff, there are lots of cheap ones around and I've been using them for
a long time.
I always felt PIC data was written for programmers rather than engineers
- they seemed to make it hard to find meaningful electrical data, if
there even is any! ditto their mnemonics, which is moot when using C.
about the only constraint I have though is a wont use micros without
multiply instructions. I had a job a few years back where I had to fix
somebody elses design of a micro-controlled smps using an AVR; making a
closed-loop controller without a multiply instruction was a real PITA.
Cheers
Terry

Re: How to check 125 logic states...?

I had no real problems at all with PIC assembler, and I thought it was
actually good in many respects, so I can't see what all the fuss is
about really with one instruction set vs another, you just get used to
it. Every micro has their own set of quirks, I have never found one
that doesn't.
The biggest problem I find is not the instruction set, but the tool
chain and evaluation boards etc.
People rave on about the AVR and how fantastic it is, but my first
experience with an AVR was a nightmare, I wanted to throw the damn
thing out the window. The Atmel STK500 demo board/programmer is a
horrible abortion of jumpers and wiring, and it didn't even work out of
the box with the chip I wanted to use, I had to modify the programming
jumper cables, that is after I figured it all out myself because the
documentation was wrong. Then I found you can lock out the serial
programming port if you accidently program the oscillator register
incorrectly - frigg'n brilliant when your chip is soldered on the board
and you are using the internal oscillator. Not to mention GCC for the
AVR which people rave on about because it's free and best thing since
sliced bread. If you can get that working out of the box you are damn
lucky. I'd happily pay the $100 or whatever for a commercial C compiler
to save my sanity.
Dave :)

Re: How to check 125 logic states...?

yep.
we paid a small fortune for the sHitachi tools, and they sucked. there
was no way to get the compiler to predictably use the multiply
instruction. I could do things like change a text string in some of the
user interface code, and it would change which multiplies in the
hi-speed control loop code would use MUL, and which would call the 2us
multiply routine. seriously bizarre, and the sHitachi apps engineers
couldnt help either. in the end I wrote all of the hi-speed code in ASM.
I know plenty of people who think GCC is great, but they all tend to be
computer scientists, who are happy to spends weeks or months learning
how to configure the damned thing.
Cheers
Terry

Re: How to check 125 logic states...?

Exactly.
In the real world you often have only days to come up with a solution,
so dicking around with tools is just not an option.
By far the worst offender in this respect though are VHDL synthesis and
simulation tools for FPGA's. These mammoth pieces of insanely complex
software hardly ever just work. 90% of your development time is spent
fighting the tool chain and making it all work. Just installing the
thing takes you a week.
Dave :)

Re: How to check 125 logic states...?

it depends. programmers who are used to PC-like environments are usually
amazingly bad at low-level microcontroller-type code; I've seen some
real howlers (like the guy who used 32-bit integers for boolean flags in
C, for code running on an 8051), and one expects them to invariably
choose the most complex method to solve any given problem.
I suspect its too much abstraction; in the microcontroller world, one
generally has very tight control over the hardware, which is the exact
opposite of the PC world. and of course 64 bytes of RAM is a luxury.
its also why I prefer asm to C, because C allows you to "forget" (more
accurately, deliberately hides) a lot about the system you are coding
for. then again, its not like I code spreadsheets etc.
it also encourages sloppy, obtuse programming.
good microcontroller programmers should be treasured, they are hard to find.
Alas, crap programmers are dime-a-dozen, and techs/unis spew out
thousands of them every year. Thats one of the reasons I chose H/W -
fewer EE grads each year really know h/w, and essentially no CS grads.
(its worth noting that many H/W engineers suck too. that bell curve...)

Cheers
Terry

Re: How to check 125 logic states...?

I guess I am fortunate enough to have come throught the ranks via asm.

Abstraction is a good thing when used wisely. I often think that
poeple misunderstand PC programmers. You typically have GUI
programmers who have no concept of hardware, then you have the rest of
us that do the underlying work, such as device drivers and frameworks
for the presentation layer.
AQs for 64 bytes of memory, are your tring to control a toaster?
Hardware is cheap now, even the entry level micro's come with heaps of
ram/flash etc.

I beleive that C is just an extension on assembler. When I used to
write assembler, i thought C was rubbish. Now I write c++ and c# i
think it is much more effective in reducing development time.

Lies. I have seen terrible assembler coding too. Its how you code that
makes the difference

I agree.
Any one can do a 'hello world' in VB. However not many self taugh
'Hello VB world' programmers can actually cut real code. That is the
big misconception.

Site Timeline
- » NEC FS-6391- Small pic. when warm.
- — Next thread in » Electronics Down Under
-
- » Newbie Ni-Cd to Ni-Mh Battery Question
- — Previous thread in » Electronics Down Under
-
- » Happy Birthday
- — Newest thread in » Electronics Down Under
-
- » Jaycar.
- — Last Updated thread in » Electronics Down Under
-
- » Возможности тестера DT-830B
- — The site's Newest Thread. Posted in » Electronic Circuits (Russian)
-