Loading ...
Sorry, an error occurred while loading the content.
 

one wire UART communication atmega32

Expand Messages
  • mazhar malik
    hi i am heading to communicate a power drive unit with Atmega32(USART), the power drive unit(PDU) supports one wire communication. ofcourse i have to code it
    Message 1 of 8 , Mar 19, 2009
      hi
      i am heading to communicate a power drive unit with Atmega32(USART), the power drive unit(PDU) supports one wire communication.
      ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?

      i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
      i.e
      Asynchronous
      Half duplex
      baudrate 38400
      LSB first
      Each bit= 26microSecond
      1 start bit(0)
      8 data bits
      1 parity bit(even)
      2 stop bits(1)

      and the packet format that is used between (atmega32)UART and PDU is of as follows

      the packet length depends on the packet type that is denoted by the first or header byte.
      forexample the startup packet should look like this:
      Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)

      Header Hex 53,ASCII`S` 1 byte
      Checksum 1 byte

      Total Size of packet @38.4kbps 2 bytes

      the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
      the startup packet should be repeated every 10ms until the response from PDU received.
      now my question is how do i make packets using c?
      next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?

      thanks and looking forward for some good advice.

      regards
    • s.holder123@btinternet.com
      Hi, Personally i would recommend the winavr gcc, plenty of support and it is good. Do you need to use the mega 32, atmega 168 is a good chip with plenty of
      Message 2 of 8 , Mar 22, 2009
        Hi,

        Personally i would recommend the winavr gcc, plenty of support and it is good.

        Do you need to use the mega 32, atmega 168 is a good chip with plenty of flash and good peripherals, and should easily do what you need, does the controller need to be pc controlled is it stand alone.

        Could send you some skeleton code to get you up and running, let me know.

        Regards

        --- In booksbybibin@yahoogroups.com, mazhar malik <mazhar_80us@...> wrote:
        >
        >
        > hi
        > i am heading to communicate a power drive unit with Atmega32(USART), the power drive unit(PDU) supports one wire communication.
        > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
        >
        > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
        > i.e
        > Asynchronous
        > Half duplex
        > baudrate 38400
        > LSB first
        > Each bit= 26microSecond
        > 1 start bit(0)
        > 8 data bits
        > 1 parity bit(even)
        > 2 stop bits(1)
        >
        > and the packet format that is used between (atmega32)UART and PDU is of as follows
        >
        > the packet length depends on the packet type that is denoted by the first or header byte.
        > forexample the startup packet should look like this:
        > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
        >
        > Header Hex 53,ASCII`S` 1 byte
        > Checksum 1 byte
        >
        > Total Size of packet @38.4kbps 2 bytes
        >
        > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
        > the startup packet should be repeated every 10ms until the response from PDU received.
        > now my question is how do i make packets using c?
        > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
        >
        > thanks and looking forward for some good advice.
        >
        > regards
        >
      • mazhar malik
        Thanks for the reply dear.u r right right now i have atmega32 available main be i will switch to some other controller having 2 USARTS in future to control the
        Message 3 of 8 , Mar 24, 2009
          Thanks for the reply dear.
          u r right right now i have atmega32 available main be i will switch to some other controller having 2 USARTS in future to control the PDU unit through computer, but right now the controller should work standalone, my idea is to connect a joystick with controller and then control the PDU through that. i am also sharing the detail document may be it will give u a more wider picture of what i am doing, 
          and i really appreciate if u give me some skeleton code hope u will understand the attached document. 

          thanks and looking forward to your kind advice.

          Best Regards

          --- On Sun, 3/22/09, s.holder123@... <s.holder123@...> wrote:

          From: s.holder123@... <s.holder123@...>
          Subject: [booksbybibin,www.booksbybibin.tk] Re: one wire UART communication atmega32
          To: booksbybibin@yahoogroups.com
          Date: Sunday, March 22, 2009, 8:04 PM

          Hi,

          Personally i would recommend the winavr gcc, plenty of support and it is good.

          Do you need to use the mega 32, atmega 168 is a good chip with plenty of flash and good peripherals, and should easily do what you need, does the controller need to be pc controlled is it stand alone.

          Could send you some skeleton code to get you up and running, let me know.

          Regards

          --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
          >
          >
          > hi
          > i am heading to communicate a power drive unit with Atmega32(USART) , the power drive unit(PDU) supports one wire communication.
          > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
          >
          > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
          > i.e
          > Asynchronous
          > Half duplex
          > baudrate 38400
          > LSB first
          > Each bit= 26microSecond
          > 1 start bit(0)
          > 8 data bits
          > 1 parity bit(even)
          > 2 stop bits(1)
          >
          > and the packet format that is used between (atmega32)UART and PDU is of as follows
          >
          > the packet length depends on the packet type that is denoted by the first or header byte.
          > forexample the startup packet should look like this:
          > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
          >
          > Header Hex 53,ASCII`S` 1 byte
          > Checksum 1 byte
          >
          > Total Size of packet @38.4kbps 2 bytes
          >
          > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
          > the startup packet should be repeated every 10ms until the response from PDU received.
          > now my question is how do i make packets using c?
          > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
          >
          > thanks and looking forward for some good advice.
          >
          > regards
          >


        • s.holder123@btinternet.com
          Hi, Got the document, have started hackig togeather a project for you, it will take me a day or 2, will send it as a zip file, hopefully we can get it right
          Message 4 of 8 , Mar 24, 2009
            Hi,

            Got the document, have started hackig togeather a project for you, it will take me a day or 2, will send it as a zip file, hopefully we can get it right first time, and sort out the registar names correctly.

            Will try and document so you have a good idea what is going on.

            Regards

            --- In booksbybibin@yahoogroups.com, mazhar malik <mazhar_80us@...> wrote:
            >
            > Thanks for the reply dear.u r right right now i have atmega32 available main be i will switch to some other controller having 2 USARTS in future to control the PDU unit through computer, but right now the controller should work standalone, my idea is to connect a joystick with controller and then control the PDU through that. i am also sharing the detail document may be it will give u a more wider picture of what i am doing, and i really appreciate if u give me some skeleton code hope u will understand the attached document. 
            > thanks and looking forward to your kind advice.
            > Best Regards
            > --- On Sun, 3/22/09, s.holder123@... <s.holder123@...> wrote:
            >
            > From: s.holder123@... <s.holder123@...>
            > Subject: [booksbybibin,www.booksbybibin.tk] Re: one wire UART communication atmega32
            > To: booksbybibin@yahoogroups.com
            > Date: Sunday, March 22, 2009, 8:04 PM
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            > Hi,
            >
            >
            >
            > Personally i would recommend the winavr gcc, plenty of support and it is good.
            >
            >
            >
            > Do you need to use the mega 32, atmega 168 is a good chip with plenty of flash and good peripherals, and should easily do what you need, does the controller need to be pc controlled is it stand alone.
            >
            >
            >
            > Could send you some skeleton code to get you up and running, let me know.
            >
            >
            >
            > Regards
            >
            >
            >
            > --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
            >
            > >
            >
            > >
            >
            > > hi
            >
            > > i am heading to communicate a power drive unit with Atmega32(USART) , the power drive unit(PDU) supports one wire communication.
            >
            > > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
            >
            > >
            >
            > > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
            >
            > > i.e
            >
            > > Asynchronous
            >
            > > Half duplex
            >
            > > baudrate 38400
            >
            > > LSB first
            >
            > > Each bit= 26microSecond
            >
            > > 1 start bit(0)
            >
            > > 8 data bits
            >
            > > 1 parity bit(even)
            >
            > > 2 stop bits(1)
            >
            > >
            >
            > > and the packet format that is used between (atmega32)UART and PDU is of as follows
            >
            > >
            >
            > > the packet length depends on the packet type that is denoted by the first or header byte.
            >
            > > forexample the startup packet should look like this:
            >
            > > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
            >
            > >
            >
            > > Header Hex 53,ASCII`S` 1 byte
            >
            > > Checksum 1 byte
            >
            > >
            >
            > > Total Size of packet @38.4kbps 2 bytes
            >
            > >
            >
            > > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
            >
            > > the startup packet should be repeated every 10ms until the response from PDU received.
            >
            > > now my question is how do i make packets using c?
            >
            > > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
            >
            > >
            >
            > > thanks and looking forward for some good advice.
            >
            > >
            >
            > > regards
            >
            > >
            >
          • mazhar malik
            thank you very  much holder123for the support i really grateful if i got such explaind program, i will wait no problem in the mean while i am also trying to
            Message 5 of 8 , Mar 25, 2009
              thank you very  much holder123
              for the support i really grateful if i got such explaind program, i will wait no problem in the mean while i am also trying to sort it out. and this will be good for me that i can discuss with u. i have installed AVRstudio and winavr gcc on my PC as per ur suggestion. thanks alot
              looking forward 

              with best Regards
              mazhar

              --- On Tue, 3/24/09, s.holder123@... <s.holder123@...> wrote:

              From: s.holder123@... <s.holder123@...>
              Subject: [booksbybibin,www.booksbybibin.tk] Re: one wire UART communication atmega32
              To: booksbybibin@yahoogroups.com
              Date: Tuesday, March 24, 2009, 8:22 PM

              Hi,

              Got the document, have started hackig togeather a project for you, it will take me a day or 2, will send it as a zip file, hopefully we can get it right first time, and sort out the registar names correctly.

              Will try and document so you have a good idea what is going on.

              Regards

              --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
              >
              > Thanks for the reply dear.u r right right now i have atmega32 available main be i will switch to some other controller having 2 USARTS in future to control the PDU unit through computer, but right now the controller should work standalone, my idea is to connect a joystick with controller and then control the PDU through that. i am also sharing the detail document may be it will give u a more wider picture of what i am doing, and i really appreciate if u give me some skeleton code hope u will understand the attached document. 
              > thanks and looking forward to your kind advice.
              > Best Regards
              > --- On Sun, 3/22/09, s.holder123@ ... <s.holder123@ ...> wrote:
              >
              > From: s.holder123@ ... <s.holder123@ ...>
              > Subject: [booksbybibin, www.booksbybibin .tk] Re: one wire UART communication atmega32
              > To: booksbybibin@ yahoogroups. com
              > Date: Sunday, March 22, 2009, 8:04 PM
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              > Hi,
              >
              >
              >
              > Personally i would recommend the winavr gcc, plenty of support and it is good.
              >
              >
              >
              > Do you need to use the mega 32, atmega 168 is a good chip with plenty of flash and good peripherals, and should easily do what you need, does the controller need to be pc controlled is it stand alone.
              >
              >
              >
              > Could send you some skeleton code to get you up and running, let me know.
              >
              >
              >
              > Regards
              >
              >
              >
              > --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
              >
              > >
              >
              > >
              >
              > > hi
              >
              > > i am heading to communicate a power drive unit with Atmega32(USART) , the power drive unit(PDU) supports one wire communication.
              >
              > > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
              >
              > >
              >
              > > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
              >
              > > i.e
              >
              > > Asynchronous
              >
              > > Half duplex
              >
              > > baudrate 38400
              >
              > > LSB first
              >
              > > Each bit= 26microSecond
              >
              > > 1 start bit(0)
              >
              > > 8 data bits
              >
              > > 1 parity bit(even)
              >
              > > 2 stop bits(1)
              >
              > >
              >
              > > and the packet format that is used between (atmega32)UART and PDU is of as follows
              >
              > >
              >
              > > the packet length depends on the packet type that is denoted by the first or header byte.
              >
              > > forexample the startup packet should look like this:
              >
              > > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
              >
              > >
              >
              > > Header Hex 53,ASCII`S` 1 byte
              >
              > > Checksum 1 byte
              >
              > >
              >
              > > Total Size of packet @38.4kbps 2 bytes
              >
              > >
              >
              > > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
              >
              > > the startup packet should be repeated every 10ms until the response from PDU received.
              >
              > > now my question is how do i make packets using c?
              >
              > > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
              >
              > >
              >
              > > thanks and looking forward for some good advice.
              >
              > >
              >
              > > regards
              >
              > >
              >


            • s.holder123@btinternet.com
              No problem, I have got the code togeather and it seems to compile, although i have no way of testing it certainly not fully. I have based the software on a
              Message 6 of 8 , Mar 26, 2009
                No problem,

                I have got the code togeather and it seems to compile, although i have no way of testing it certainly not fully. I have based the software on a test circuit which i will include in the software files, i will post tommorow evening in a zip file, hopefully you can get it running, when you have had a look through it if you have any questions just let me know, hopefully there won't be too many bugs but should give you a good start.

                Regards

                Steven Holder

                --- In booksbybibin@yahoogroups.com, mazhar malik <mazhar_80us@...> wrote:
                >
                > thank you very  much holder123for the support i really grateful if i got such explaind program, i will wait no problem in the mean while i am also trying to sort it out. and this will be good for me that i can discuss with u. i have installed AVRstudio and winavr gcc on my PC as per ur suggestion. thanks alotlooking forward 
                > with best Regardsmazhar
                >
                > --- On Tue, 3/24/09, s.holder123@... <s.holder123@...> wrote:
                >
                > From: s.holder123@... <s.holder123@...>
                > Subject: [booksbybibin,www.booksbybibin.tk] Re: one wire UART communication atmega32
                > To: booksbybibin@yahoogroups.com
                > Date: Tuesday, March 24, 2009, 8:22 PM
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                > Hi,
                >
                >
                >
                > Got the document, have started hackig togeather a project for you, it will take me a day or 2, will send it as a zip file, hopefully we can get it right first time, and sort out the registar names correctly.
                >
                >
                >
                > Will try and document so you have a good idea what is going on.
                >
                >
                >
                > Regards
                >
                >
                >
                > --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
                >
                > >
                >
                > > Thanks for the reply dear.u r right right now i have atmega32 available main be i will switch to some other controller having 2 USARTS in future to control the PDU unit through computer, but right now the controller should work standalone, my idea is to connect a joystick with controller and then control the PDU through that. i am also sharing the detail document may be it will give u a more wider picture of what i am doing, and i really appreciate if u give me some skeleton code hope u will understand the attached document. 
                >
                > > thanks and looking forward to your kind advice.
                >
                > > Best Regards
                >
                > > --- On Sun, 3/22/09, s.holder123@ ... <s.holder123@ ...> wrote:
                >
                > >
                >
                > > From: s.holder123@ ... <s.holder123@ ...>
                >
                > > Subject: [booksbybibin, www.booksbybibin .tk] Re: one wire UART communication atmega32
                >
                > > To: booksbybibin@ yahoogroups. com
                >
                > > Date: Sunday, March 22, 2009, 8:04 PM
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > >
                >
                > > Hi,
                >
                > >
                >
                > >
                >
                > >
                >
                > > Personally i would recommend the winavr gcc, plenty of support and it is good.
                >
                > >
                >
                > >
                >
                > >
                >
                > > Do you need to use the mega 32, atmega 168 is a good chip with plenty of flash and good peripherals, and should easily do what you need, does the controller need to be pc controlled is it stand alone.
                >
                > >
                >
                > >
                >
                > >
                >
                > > Could send you some skeleton code to get you up and running, let me know.
                >
                > >
                >
                > >
                >
                > >
                >
                > > Regards
                >
                > >
                >
                > >
                >
                > >
                >
                > > --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
                >
                > >
                >
                > > >
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > hi
                >
                > >
                >
                > > > i am heading to communicate a power drive unit with Atmega32(USART) , the power drive unit(PDU) supports one wire communication.
                >
                > >
                >
                > > > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
                >
                > >
                >
                > > > i.e
                >
                > >
                >
                > > > Asynchronous
                >
                > >
                >
                > > > Half duplex
                >
                > >
                >
                > > > baudrate 38400
                >
                > >
                >
                > > > LSB first
                >
                > >
                >
                > > > Each bit= 26microSecond
                >
                > >
                >
                > > > 1 start bit(0)
                >
                > >
                >
                > > > 8 data bits
                >
                > >
                >
                > > > 1 parity bit(even)
                >
                > >
                >
                > > > 2 stop bits(1)
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > and the packet format that is used between (atmega32)UART and PDU is of as follows
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > the packet length depends on the packet type that is denoted by the first or header byte.
                >
                > >
                >
                > > > forexample the startup packet should look like this:
                >
                > >
                >
                > > > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > Header Hex 53,ASCII`S` 1 byte
                >
                > >
                >
                > > > Checksum 1 byte
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > Total Size of packet @38.4kbps 2 bytes
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
                >
                > >
                >
                > > > the startup packet should be repeated every 10ms until the response from PDU received.
                >
                > >
                >
                > > > now my question is how do i make packets using c?
                >
                > >
                >
                > > > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > thanks and looking forward for some good advice.
                >
                > >
                >
                > > >
                >
                > >
                >
                > > > regards
                >
                > >
                >
                > > >
                >
                > >
                >
              • s.holder123@btinternet.com
                Hi, Have finished the cosing with the required documentation, how do i post a file in this forum ? or do you want me to send it to an e-mail address. Regards
                Message 7 of 8 , Mar 27, 2009
                  Hi,

                  Have finished the cosing with the required documentation, how do i post a file in this forum ? or do you want me to send it to an e-mail address.

                  Regards

                  Steven Holder

                  --- In booksbybibin@yahoogroups.com, mazhar malik <mazhar_80us@...> wrote:
                  >
                  >
                  > hi
                  > i am heading to communicate a power drive unit with Atmega32(USART), the power drive unit(PDU) supports one wire communication.
                  > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
                  >
                  > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
                  > i.e
                  > Asynchronous
                  > Half duplex
                  > baudrate 38400
                  > LSB first
                  > Each bit= 26microSecond
                  > 1 start bit(0)
                  > 8 data bits
                  > 1 parity bit(even)
                  > 2 stop bits(1)
                  >
                  > and the packet format that is used between (atmega32)UART and PDU is of as follows
                  >
                  > the packet length depends on the packet type that is denoted by the first or header byte.
                  > forexample the startup packet should look like this:
                  > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
                  >
                  > Header Hex 53,ASCII`S` 1 byte
                  > Checksum 1 byte
                  >
                  > Total Size of packet @38.4kbps 2 bytes
                  >
                  > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
                  > the startup packet should be repeated every 10ms until the response from PDU received.
                  > now my question is how do i make packets using c?
                  > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
                  >
                  > thanks and looking forward for some good advice.
                  >
                  > regards
                  >
                • mazhar malik
                  Thank you very much s.holderplease send me on my yahoo mail i.e. mazhar_80us@yahoo.com i am really grateful to this help.thanks alot Best Regards mazhar..
                  Message 8 of 8 , Mar 27, 2009
                    Thank you very much s.holder
                    please send me on my yahoo mail 
                    i.e. 
                    mazhar_80us@...

                    i am really grateful to this help.
                    thanks alot

                    Best Regards 
                    mazhar..

                    --- On Fri, 3/27/09, s.holder123@... <s.holder123@...> wrote:

                    From: s.holder123@... <s.holder123@...>
                    Subject: [booksbybibin,www.booksbybibin.tk] Re: one wire UART communication atmega32
                    To: booksbybibin@yahoogroups.com
                    Date: Friday, March 27, 2009, 10:04 AM

                    Hi,

                    Have finished the cosing with the required documentation, how do i post a file in this forum ? or do you want me to send it to an e-mail address.

                    Regards

                    Steven Holder

                    --- In booksbybibin@ yahoogroups. com, mazhar malik <mazhar_80us@ ...> wrote:
                    >
                    >
                    > hi
                    > i am heading to communicate a power drive unit with Atmega32(USART) , the power drive unit(PDU) supports one wire communication.
                    > ofcourse i have to code it in C, but i am confuse of choosing compiler is it, i have both WinAVR GCC(progrmmers notepad) and Imagecraft ICCV7, my first question is which one do i select to work with? i mean which one is easy to use?
                    >
                    > i am bit confuse of making packet Format in C,the byte format for this communication should be of 12bits
                    > i.e
                    > Asynchronous
                    > Half duplex
                    > baudrate 38400
                    > LSB first
                    > Each bit= 26microSecond
                    > 1 start bit(0)
                    > 8 data bits
                    > 1 parity bit(even)
                    > 2 stop bits(1)
                    >
                    > and the packet format that is used between (atmega32)UART and PDU is of as follows
                    >
                    > the packet length depends on the packet type that is denoted by the first or header byte.
                    > forexample the startup packet should look like this:
                    > Startup packet should be of 2 bytes of 12 bits= 0.624mS (26microsecond per bit)
                    >
                    > Header Hex 53,ASCII`S` 1 byte
                    > Checksum 1 byte
                    >
                    > Total Size of packet @38.4kbps 2 bytes
                    >
                    > the last byte of the packet contains the packet checksum, which is calculated by summing the previous bytes of the packet and then 1`s complementing the answer.
                    > the startup packet should be repeated every 10ms until the response from PDU received.
                    > now my question is how do i make packets using c?
                    > next is that as i never did UART programming before, considering the above senario how do i start writing a USART interface program for such communication?
                    >
                    > thanks and looking forward for some good advice.
                    >
                    > regards
                    >


                  Your message has been successfully submitted and would be delivered to recipients shortly.