CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

sending int18 by usb

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
asdrojas
Guest







sending int18 by usb
PostPosted: Thu Nov 20, 2008 2:49 pm     Reply with quote

Hello, I was trying to send a int18 by usb, but the PC always received one byte with 0 and another with 14, the following is part of the code
Code:

int16 Pu=500;
int16 *ptr;

void main(){
   ptr=Pu;
   if(usb_enumerated()){
      usb_put_packet(1, ptr, 2, USB_DTS_TOGGLE);
   }
   output_toggle(PIN_B1);
}


I configured the usb correctly because I don't have problem sending one byte.
Ttelmah
Guest







PostPosted: Thu Nov 20, 2008 3:46 pm     Reply with quote

ptr=&Pu;

You are currently sending the contents of _address_ 500, which could contain anything...

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group