6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed May 08, 2024 1:53 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: [32.1] Experiments?
PostPosted: Sat Mar 11, 2000 2:29 am 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 280
Location: Northern California
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?

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Report this post
Top
 Profile  
Reply with quote  
 Post subject: [32.2] Experiments?
PostPosted: Sun Mar 12, 2000 12:55 am 
Offline

Joined: Fri Aug 30, 2002 3:06 pm
Posts: 124
Location: Colorado
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: [32.3] Experiments?
PostPosted: Mon Mar 13, 2000 4:26 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 280
Location: Northern California
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.

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Report this post
Top
 Profile  
Reply with quote  
 Post subject: [32.4] Experiments?
PostPosted: Tue Mar 14, 2000 11:02 pm 
Offline

Joined: Fri Aug 30, 2002 3:06 pm
Posts: 124
Location: Colorado
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: [32.5] Experiments?
PostPosted: Wed Mar 15, 2000 1:49 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 280
Location: Northern California
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.

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Report this post
Top
 Profile  
Reply with quote  
 Post subject: [32.6] Experiments?
PostPosted: Thu Jul 13, 2000 10:27 pm 
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


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: