sjukheter Posted March 2, 2011 Report Share Posted March 2, 2011 (edited) Hi, I just want to write a packet to the serial port in hex format . Right now i am writing only command code(88) which is in hex but now i want extend this command to following format (see Pic). Now i need to write command in the given manner . Some one help me how i can do like that. I need to write in hex format but for first bit S, how can i write in hex. Please some one can give me any example. the red circle contains real packet structure used by some other people. the same in i am doing in labview. Edited March 2, 2011 by sjukheter Quote Link to comment
curiouspuya Posted March 3, 2011 Report Share Posted March 3, 2011 Hi, Writing hex codes to serial is the easy bit. What is not clear is how you can send the stop bits and start bit and acknowledge bit. You need to dig out more information first about what those bits are and how they are handled. A hex bite has 8 bits in it so there is not real "hex" code for a stop bit. it must be another bite flag or something that could be driven on another line. have you got any more examples? Puya Hi, I just want to write a packet to the serial port in hex format . Right now i am writing only command code(88) which is in hex but now i want extend this command to following format (see Pic). Now i need to write command in the given manner . Some one help me how i can do like that. I need to write in hex format but for first bit S, how can i write in hex. Please some one can give me any example. the red circle contains real packet structure used by some other people. the same in i am doing in labview. Quote Link to comment
sjukheter Posted March 3, 2011 Author Report Share Posted March 3, 2011 Hi, Writing hex codes to serial is the easy bit. What is not clear is how you can send the stop bits and start bit and acknowledge bit. You need to dig out more information first about what those bits are and how they are handled. A hex bite has 8 bits in it so there is not real "hex" code for a stop bit. it must be another bite flag or something that could be driven on another line. have you got any more examples? Puya No, but you can see the attchment for whole command structure and command codes(see page 15 , 16 ,55,56 and last pages have all the comand codes in table). My doubt is if i taken start bit as1 one stop bit as 0 then is there any problem in sending lot commands with these bits. In between the start and stop bits i have to send original packet which have hex byte(command code) and address byte. can any one tell me which bits are better to take as start and stop because i think 1 and zero will create problems. More some times i need send REPEATED START BIT, how can i choose this bit. At last i need to send whole packet as in hex how i can send hex then start and stop bits will change some other..fully confused can any one explaine me... PMBus_Specification_Part_II_Rev_1-1_20070205.pdf Quote Link to comment
Jon Kokott Posted March 3, 2011 Report Share Posted March 3, 2011 This is a separate serial bus. Are you tring to use RS-232/UART or some other standard to communicate over this bus? it seems like you are trying to hack together something together from the VISA commands to emulate device drivers. Quote Link to comment
sjukheter Posted March 3, 2011 Author Report Share Posted March 3, 2011 This is a separate serial bus. Are you tring to use RS-232/UART or some other standard to communicate over this bus? it seems like you are trying to hack together something together from the VISA commands to emulate device drivers. i am using usb connectionfrom PC to my controller and controller converts usb to i2c which connected over PMBus to smps. Quote Link to comment
Jon Kokott Posted March 3, 2011 Report Share Posted March 3, 2011 I'm gonna assume you had some help selecting this hardware configuration, and it is known to work. Start by sending whatever examples you have of communication in the white paper and observing the responses. ~Jon Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.