556 dual timer problem

Dec 04, 2009 63 Replies

On a sunny day (Fri, 04 Dec 2009 14:18:27 -0800) it happened Rich Grise wrote in :

Real man write asm. For something as simple as that .. just a few lines asm. Hey it is only 35 or so instructions... Read datasheets, your first take with any micro is learning about the hardware in it, interrupt system, memory organisation, initialisation requirements... But for the second project you can probably (if you worked in a clean way) re-use much of the code. PICs are programed via a 3 wire system. noppp programmer connects to some of the par port pins. I wrote Linux soft for that circuit to program several PIC types. Others did the same. Code for noppp available upon request. And if anybody complains about timing, IIRC I used the PC timer, so it should work on any PC with a parport, 3$ part counts.

But you need to understand the basics of microprocessors, and programming. That may take a while, and probably a lifetime to keep up. And there are a thousand if not more solutions to the same problem possible. All software, interrupts, hardware timers in the micro, it all up to you. Plenty of example code on the Microchip site. They also have a free C compiler and some cheap PIC programmer. But for some flashing light? C? BASIC? Where is the world going? hehe

Well, duh it needs flash. I don't even know of video sites offhand that don't use Flash or Javascript in some fashion. Youtube, Google Video, Metacafe, etc.

formatting link

As for popups, there are none. There are ads, since they need income.

Tim

Deep Friar: a very philosophical monk. Website: http://webpages.charter.net/dawill/tmoranwms

No.

Real men use COPY CON MYPROG.ARJ

I have an extra PIC-2 kit..Interested?

Are you in the UK??

Cheers

Ian

On a sunny day (Fri, 4 Dec 2009 19:22:06 -0600) it happened "Tim Williams" wrote in :

Yes Tim, you CAN get rich pulcking your nose :-)! hehe

You dont need a $150.00 dev. kit all you need is a PICKIT2 or 3 usb programer . $50.00 if you search around you could probably find it cheaper.Microchip supplies free C and asm compilier.

It would take him maybe a day to figure out how to program his 556 circuit.

formatting link

I would have used one of those Phillips low pin count (8-pin dip) 8051 varieties. The ones with the internal oscillator.

No worries here - I've been programming micros since there have been micros. (my first computer course was on the Control Data (Bendix) G-15:

formatting link
in about 1966. :-)

The problem I have with the PIC is bank switching, which I consider evil. ;-) I was thinking about a HLL because the compiler "should" handle all that.

Or is there a version of the PIC that does all the above _without_ any bank switching?

Thanks, Rich

"ARJ?"

These are two different animals - which language vs. editor or not.

e.g., copy con myprog.c, copy con myprog.asm, copy con myprog.bas, etc.

What's "ARJ?"

Thanks, Rich

I might have to bank switch and PIC a new bank. A report about my bank; "The bank's board of directors received an order from the Office of Thrift Supervision last Friday. The order followed an August notification that THE BANK was significantly under-capitalized. The bank responded with a Capital Restoration Plan in October, but it was rejected by federal regulators." (Dec 4)

On a sunny day (Sat, 05 Dec 2009 10:39:37 -0800) it happened Rich Grise wrote in :

Sometimes people reach out to a higher level language for the wrong reason. If the reason is:'That will make it simpler for me to write programs, as I do not have to worry about the hardware architecture', then, on a micro controller, that is the wrong reason. You will have 2 problems when doing that:

1) To see the 'C', or whatever language, is far from normal C, needing a whole lot of time to learn all the micro related tricks. 2) You still have to understand the peripherals on the chip, and as such the memory architecture and banks, to make sensible use out of the on board hardware.

There are bigger PICs, I have not used those,

formatting link
gives all the info you want.

Yes bank swiching is a programming load... at some point you almost need a bank select instruction before each instruction... But then, if you do that, you have no need to lookup in what memory banks the registers are, as in for example gpasm, you can say:

test_timer1_interrupt: banksel PIR1 ; bank 0 btfss PIR1, TMR1IF goto test_rx_interrupt

The 'btfss' stands for 'test bit TMR1IF in register PIR1 and skip if set', so if that bit is set, it will skip the goto... A little bit different from some other asms.

PS 'a little bit' is also a bit, but in this context does not refer to a bit. uche

On a sunny day (Sat, 5 Dec 2009 12:50:48 -0600) it happened "amdx" wrote in :

I think it might not hurt in the current situation to have some gold stuffed somewhere. Hundreds of banks went belly up, and the FED may have no menoy to buy new printing presses from China.

se

C or

and

5:

il.

l

ft

y

fed somewhere.

Well, if you follow that concept to its logical conclusion, you should buy ammunition, not gold.

An archive prog... Like "ZIP" or "ARC" !

Best Regards: Baron.

No, in the states, but postage is not that much different.

OK, I have bought tubes from the US and postage was $15 or less, so how much do you want for it?

Cheers

Ian

somewhere.

Got ya' covered. ;-)

somewhere.

Once again, you make no sense. WHY WOULD THEY NEED NEW PRINTING PRESSES?

The movie \'Deliverance\' isn\'t a documentary!

Give me an address and i will ship it. email address easily available in header.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required