6502.org
http://forum.6502.org/

[32] Experiments?
http://forum.6502.org/viewtopic.php?f=7&t=290
Page 1 of 1

Author:  Mike Naberezny [ Sat Mar 11, 2000 2:29 am ]
Post subject:  [32.1] Experiments?

Hi All,

I've been thinking about teaching a class on the 6502 at a local community college and I'm trying to put together some kind of lesson plan. Students will already have an introductory knowledge of programming and microprocessors. This will be a lab-based course and I'll need to put together about ten labs. I'm thinking of things like controlling a character-based LCD panel and driving a DC motor with PWM. Any other ideas?

Author:  saipan59 [ Sun Mar 12, 2000 12:55 am ]
Post subject:  [32.2] Experiments?

As a software exercise, I suggest that the students implement a RAM memory test. The test should detect both open and shorted address and/or data lines.

Also, how about a CPU test? Verify the functionality of each opcode; starting with the most basic, and working up to the fancier ones.

HW/SW project: Make a crude D/A using resistors on an output port. Then write code to synthesize certain waveforms.

Pete

Author:  Mike Naberezny [ Mon Mar 13, 2000 4:26 pm ]
Post subject:  [32.3] Experiments?

Those are both good ideas, thanks Pete. I'm going to have to teach some assembly language before we start jumping into experiments, and the CPU test idea fits perfectly with that.

I may try to make an experiment with your D/A converter as well. I'm trying to combine hardware and software into some interesting projects, sort of like the "Hardware Mini-Projects" on the www.6502.org site, but more educational.

I've been working on a lab with the Sharp GP2D02 infared ranging sensor. Have you seen it yet? It's a really neat sensor for robots. I'm going to post a simple schematic and code in the Hardware Mini-Projects section when I'm done.

Author:  saipan59 [ Tue Mar 14, 2000 11:02 pm ]
Post subject:  [32.4] Experiments?

Another idea:
Once the D/A is in place, just add a comparator and make it an A/D - the software would do a 'binary search' type of thing to determine the value.
For 'speed', connect the comparator output to an interrupt line (like CA1), then let the software change the D/A output as fast as possible, and when it hits the right value, you get an interrupt to let you know that you're done.

I haven't tried one of those Sharp sensors yet.

Pete

Author:  Mike Naberezny [ Wed Mar 15, 2000 1:49 pm ]
Post subject:  [32.5] Experiments?

Pete,

You should definitely check out the Sharp GP2D02 infared ranging sensor for your robot projects. (Btw, how is VICBOT coming?) I tried making proximity detectors from the IR data receivers and had unacceptable results, even after trying about five different circuits from the web and using an intelligent algorithm to filter the sensor output. My frustration with these is what drove me to buy some GP2D02s.
I finally got them to work last night and I'll be posting a Hardware Mini-Project very soon. There are four wires on the sensor, power and a two-wire interface to the sensor. Once you trigger the sensor all you have to do is clock out eight data bits and you have a byte representing the distance of the object away from the sensor. I have found it to be very accurate and very repeatable. I am going to use two of these sensors mounted on servos on the front of my robot Gilbert so he can map out the terrain in front of him and plan course changes appropriately.

Author:  BDFarley [ Thu Jul 13, 2000 10:27 pm ]
Post subject:  [32.6] Experiments?

Pete's ideas are good ones, very usefull in the real world.

I would also suggest a hardware+software project to implement an interrupt-based timer/counter such as is found as part of many of the small single-chip microcontrollers used in modern toys and consumer products. Any of your students who go on to develop embedded microcontroller code in the "real world" WILL be using these peripherals on a daily basis! Might as well get used to them now... A a lab is a great place to learn about their limitations, such as reading the two-byte value while the counter is running and having to take into account whether or not the low byte might have rolled-over between the successive reads. This is a distinct HEADACHE I face regularly with the SunPlus line of 6502-based embedded controllers, which unlike many other controllers do not buffer the low byte when the high byte is is read.

-- Brian Farley

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/