Go to Post Holonomic? I thought we were holographic. Or was that autonomic? I'm confused.... - Wayne C. [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
  #1   Spotlight this post!  
Unread 21-02-2014, 10:03
Tem1514 Mentor's Avatar
Tem1514 Mentor Tem1514 Mentor is offline
Registered User
FRC #1514
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Toronto
Posts: 239
Tem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to beholdTem1514 Mentor is a splendid one to behold
BCD switch programming

I am looking for a little insight on how to program a number of different autonomous functions by using a BCD (binary coded decimal) switch that will provide 0-9 out to the digital sidecar.

Let us assume that the BCD switch is wired to bits 5 thru 8 on the side car with bit 5 as LSB and 8 as MSB.

My question(s) are when using C++;
1) how do you mask out only the BCD to have a “more useful number”?
2) To select any one autonomous mode would you use ‘IF’s’ or ‘Case’ statements?

It would be real nice to see some sample code for this as I’m sure it go a long way for other teams as well.

Even better would be examples using C++, Java and Labview.

I sure hope that Alan will jump in on this one
 


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


All times are GMT -5. The time now is 22:03.

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