Useless Projects Vs. Useful Projects
- James_Parsons
- Posts: 67
- Joined: 10 Jul 2013
Useless Projects Vs. Useful Projects
This may be me, but i think build a project (with an MPU) that flashes LED's is pretty useless. My reason for believing so is that this can be accomplished with a 555 timer, or some chip from radio shack. You really don't learn much assembly.
JMP $FFD2
Re: Useless Projects Vs. Useful Projects
Having learned how to use a 555, a person is then in a position to use it as part of a larger, more ambitious project.
The same applies to the simple assembly-language loop. In both cases we're dealing with building blocks -- elements that, once mastered, can then be used as part of a greater whole.
-- Jeff
The same applies to the simple assembly-language loop. In both cases we're dealing with building blocks -- elements that, once mastered, can then be used as part of a greater whole.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Useless Projects Vs. Useful Projects
When migrating to a new and different microcontroller,
and you are not absolutely sure about how to set
all those fuse/configuration Bits,
a simple application like a blinking LED
probably is the best way for getting started.
Because then you know, how to configurate
and to initialize that microcontroller
for running more complicated code later.
When debugging more complicated code on microcontrollers,
blinking LEDs could turn out to be very useful...
for getting a clue about when and where your code crashed,
for instance.
http://wilsonminesco.com/6502primer/debug.html
and you are not absolutely sure about how to set
all those fuse/configuration Bits,
a simple application like a blinking LED
probably is the best way for getting started.
Because then you know, how to configurate
and to initialize that microcontroller
for running more complicated code later.
When debugging more complicated code on microcontrollers,
blinking LEDs could turn out to be very useful...
for getting a clue about when and where your code crashed,
for instance.
http://wilsonminesco.com/6502primer/debug.html
- BigDumbDinosaur
- Posts: 9427
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Useless Projects Vs. Useful Projects
James_Parsons wrote:
This may be me, but i think build a project (with an MPU) that flashes LED's is pretty useless. My reason for believing so is that this can be accomplished with a 555 timer, or some chip from radio shack. You really don't learn much assembly.
- It doesn't do anything, AND...
- You can't learn anything from building it, AND...
- Your mind is closed to learning the basics.
At the risk of severely mixing up metaphors, perhaps using an MPU to flash LEDs or make irritating noises would be like the Navy sending out a battleship to sink a rowboat. Despite the seemingly uselessness of the mission, not to mention the gross overkill, the sailors still get some training and practice in how to handle the ship, aim the guns and hit a moving target.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Useless Projects Vs. Useful Projects
I agree with BDD and Dr Jefyll.
It's funny how many times I revert to flashing LEDs on a card when trying to bring up a complex design. After 30+ years in electronics I kick myself every time that I forget put an LED for power status and at least one for blinking by SW/HW.
It's funny how many times I revert to flashing LEDs on a card when trying to bring up a complex design. After 30+ years in electronics I kick myself every time that I forget put an LED for power status and at least one for blinking by SW/HW.
Michael A.
Re: Useless Projects Vs. Useful Projects
I'll just chime in with an agreement as well. A blinking LED is the "Hello, World!" program of the hardware world. If I didn't have a logic analyzer, I'd be hooking up an LED to address pins and writing a test program to control its blink rate, because that tells me that at least my CPU and ROM are on speaking terms. A couple more LEDs (or some careful programming) and I could send a short message (no more than 8 bits, really), which would be useful for diagnosing any problems setting up RAM or a UART, and so it goes.
Of course, a 6502 plus ROM plus RAM plus a UART isn't really that useful until you add more I/O, but don't knock the humble LED... And don't forget to put one each on the UART RxD and TxD pins (had to simulate this for a USB modem, which didn't have real RxD or TxD lines, once).
Of course, a 6502 plus ROM plus RAM plus a UART isn't really that useful until you add more I/O, but don't knock the humble LED... And don't forget to put one each on the UART RxD and TxD pins (had to simulate this for a USB modem, which didn't have real RxD or TxD lines, once).
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Useless Projects Vs. Useful Projects
As I said in the debugging page of the 6502 primer, I'm not really fond of LEDs as the initial debug tool, because an LED's on/off behavior can be a random result of a crash or accidentally writing to the wrong port at some unknown place in the code. OTOH, a beep produced by software tends to be a better indicator because the software is controlling the frequency and duration to be something recognizable that you intended, to indicate arrival at different parts of a program. It assures you that for the duration of the beep, the processor is in the beep routine, and you know where you called it in your code.
That said, I do use LEDs sometimes, particularly if a beep would slow things down too much, as I do a lot of realtime work; but in that case I put an oscilloscope probe on it, almost nullifying the use of the LED itself.
I normally keep the LED minitester on the RS-232 line. I seldom need it, but it doesn't hurt anything to leave it there.
This of course is all in the context of debugging without expensive equipment. Outside of that, I've used LEDs as status annunciators that were not particularly related to debugging. But just to see a light blink for no purpose is, well, rather puposeless.
That said, I do use LEDs sometimes, particularly if a beep would slow things down too much, as I do a lot of realtime work; but in that case I put an oscilloscope probe on it, almost nullifying the use of the LED itself.
I normally keep the LED minitester on the RS-232 line. I seldom need it, but it doesn't hurt anything to leave it there.
This of course is all in the context of debugging without expensive equipment. Outside of that, I've used LEDs as status annunciators that were not particularly related to debugging. But just to see a light blink for no purpose is, well, rather puposeless.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Useless Projects Vs. Useful Projects
When I design FPGA boards I always place an LED on them. A blinking LED means the board is alive after programming. I blink it in hardware, then I blink it in software to see if the CPU is alive. To me a blinking LED is an old friend, a thing of comfort. Later in development, the LED is always used for some kind of debugging tool.
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
Re: Useless Projects Vs. Useful Projects
I have a 74HC573 8 bit latch with LEDs attached on my machine with logic so I can address it like an IO port. That's proven to be very valuable in debugging my Orwell machine. You can copy entire memory locations to it and from BASIC I can POKE values to it to make the LEDs light up.
Simon
Simon
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer
Re: Useless Projects Vs. Useful Projects
Simon wrote:
I have a 74HC573 8 bit latch with LEDs attached on my machine with logic so I can address it like an IO port. That's proven to be very valuable in debugging my Orwell machine. You can copy entire memory locations to it and from BASIC I can POKE values to it to make the LEDs light up.
8 bit fun and games: https://www.aslak.net/
Re: Useless Projects Vs. Useful Projects
Yes, having a blinking LED is always the first sign of life! Love it!
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/