Go to Post Measure it with a micrometer, mark it with chalk, and cut it with an axe. This is not an exact science. - Jim Meyer [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 22-01-2003, 00:18
Craig Morin Craig Morin is offline
Registered User
#0677 (The Wirestrippers)
 
Join Date: Jan 2003
Location: The Ohio State University
Posts: 5
Craig Morin is an unknown quantity at this point
Send a message via AIM to Craig Morin
Quote:
Originally posted by Rickertsen2
could you be so kind as to post the asm code for the PICs that interface w/the encoders? im not very good with asm. I havn't had the time to learn it.
We have decided not to use a PIC because it would not be something that our highschool students could program or understand completely within the 6 weeks. Instead, we purchased a basic stamp 2p, which has software (polled) interrupts.

The encoder hardware consists of an IR break-beam sensor (digikey: OR518-ND) connected to a ripple-carry counter. The purpose of the counter is to offload the actual counting from the microcontroller because the microcontroller can only poll the pins and has the potential to miss counts. With the hardware counters, we can feed them a signal up to a few megahertz with no problems. So, the encoders on the wheel will be very precise, along the lines of 100 counts/revolution (before actually working the numbers). All while the basic stamp gets a nicely formed digital signal from the counters. Only one of the output lines from the counters will be hooked up to the microcontroller. Each consecutive output on the counter will toggle at half the speed of the last with twice the period, so we can choose which of those pins gives the processor enough time to count without compromising resolution.

So, the code we will be using will setup the polled interrupts on the counter input pins of the basic stamp. Then whenever a rising edge occurs, the stamp will run the interrupt page of code that polls the pins to see which encoder caused the interrupt, then add 1 to the corresponding variable location (in scratchpad ram).

good luck.
-Craig
__________________
Team 677, The Wirestrippers
Columbus School for Girls and The Ohio State University

Team Leader
Major: Electrical and Computer Engineering
Specialization: Robotic Automation and Control
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
autonomous mode timer Don Programming 6 09-02-2003 22:16
Select button and user mode n[ate]vw Programming 2 20-01-2003 16:33


All times are GMT -5. The time now is 02:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi