Thread: Beginner!!! Please help

  1. #61
    Registered User
    Join Date
    Nov 2008
    Location
    Leicester, UK
    Posts
    35
    Hello again !!!!

    I have a question. If I have to set any GPIO pin of a particular IC without the bridge chip(in this case,without using the W command) how can I do it?

  2. #62
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I have absolutely no idea. You'd have to talk to someone who knows that chip.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #63
    Registered User
    Join Date
    Nov 2008
    Location
    Leicester, UK
    Posts
    35
    Quote Originally Posted by matsp View Post
    I have absolutely no idea. You'd have to talk to someone who knows that chip.

    --
    Mats
    What I mean is, can I #define the pin?

  4. #64
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by reemaambekar View Post
    What I mean is, can I #define the pin?
    Most likely not - but again, I'm not sure what you have access to and how.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #65
    Registered User
    Join Date
    Nov 2008
    Location
    Leicester, UK
    Posts
    35
    Hello !!!

    I am transmitting the following data via ASC1 port.
    Code:
    void ASC1_send()
    {
    ASC1_vSendData ('W');			 //write to internal reg command
    ASC1_vSendData (2);				 //push pull o/p config 
    ASC1_vSendData (8);				 //set portconf1 to 0x08
    ASC1_vSendData ('P');			 //stop
    ASC1_vSendData ('O');      //write to GPIO
    ASC1_vSendData (0);				 //set it to 0
    ASC1_vSendData ('P');			 //stop		 
    ASC1_vSendData ('S');			 //start
    ASC1_vSendData (160);			 //device address=A0=>160 in decimal
    ASC1_vSendData (07);			 //data
    ASC1_vSendData (11);
    ASC1_vSendData (97);
    ASC1_vSendData (80);
    ASC1_vSendData (00);
    ASC1_vSendData (40);
    ASC1_vSendData (55);			 //data
    ASC1_vSendData (250);			 //data
    ASC1_vSendData ('S');
    ASC1_vSendData (161);
    ASC1_vSendData (07);
    ASC1_vSendData ('P');
    }
    void ASC1_vSendData(uword uwData)
    {
      ASC1_TBIC_IR = 0;        //  reset transmit buffer interrupt request 		 set = 1;
      ASC1_TBUF    = uwData;   //  load transmit buffer register
    	while (ASC1_TBIC_IR == 0);//wait till transmission finishes
    } //  End of function ASC1_vSendData
    I know that the data is being sent to the hardware since I can view it using a Scopemeter.
    I want to introduce a stop condition after the last char ie ASC1_vSendData('P') is sent. How can I do it?
    Last edited by reemaambekar; 12-16-2008 at 04:13 AM.

  6. #66
    Registered User
    Join Date
    Nov 2008
    Location
    Leicester, UK
    Posts
    35
    Hello!!!

    I want to generate a simple counter which will give me a certain delay eg 500msec in between 2 bytes of data that i am sending. How can I generate the counter??

    Thanks in advance for your help.

  7. #67
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    So use delay(500); that will give you at least 1/2 a second. Typically more, with Windows.

    There is no visible counter to delay(), however.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Same old beginner question...
    By Sharmz in forum C Programming
    Replies: 15
    Last Post: 08-04-2008, 11:48 AM
  2. What are some good beginner programs I shouold make?
    By oobootsy1 in forum C# Programming
    Replies: 6
    Last Post: 08-09-2005, 02:02 PM
  3. Books, Beginner, MustHave
    By Zeusbwr in forum C++ Programming
    Replies: 9
    Last Post: 10-25-2004, 05:14 PM
  4. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 11:21 AM