Go to Post Gracious professionalism is competing with a team one minute, and helping them fix their robot the next. It is cheering for FIRST, rather than just your team, and most importantly: it is looking at the future and saying, "Together, we can do that" - WakeZero [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 17-06-2008, 22:47
Ian Curtis Ian Curtis is offline
Best Available Data
FRC #1778 (Chill Out!)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Puget Sound
Posts: 2,521
Ian Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond reputeIan Curtis has a reputation beyond repute
Displaying a 16 bit integer on PIC 16F877?

So, I've been playing around with a 16F877, and I got my hands on one of the kit gyros, and am trying to write my own code for it. I've got it mostly working, but I need to display a 16 bit integer to figure out what constitutes a 90 degree turn. But, the PIC doesn't want to do it. I can't for the life of me get it to output a 16 bit integer (that I can understand) to the debugger using a printf. I've tried %ld, but it didn't give me the right number. Is there some other trick (or formatting) I can use?
__________________
CHILL OUT! | Aero Stability & Control Engineer
Adam Savage's Obsessions (TED Talk) (Part 2)
It is much easier to call someone else a genius than admit to yourself that you are lazy. - Dave Gingery
 


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
pic: Feeling a bit Blue Steve W Extra Discussion 3 28-10-2007 23:54
pic: A "Bit" of a problem. Herodotus Extra Discussion 26 11-10-2007 01:53
16 bit math on PIC sciguy125 Programming 17 07-10-2005 02:57
integer division ImmortalAres Programming 5 11-07-2005 21:19
Integer Number powercat Programming 2 18-02-2003 11:26


All times are GMT -5. The time now is 19:26.

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