Đang Thực Hiện

Write some Software

I need to take a piece of code written in C for creating a CRC8 and turn it into a function in VB6. I want to be able to input 2 digit string values representing hex values (STX, Keyboard number, Lamp number, Command number, ETX and it to produce the CRC.

For example:-

82 60 00 00 83 would give DA

82 60 00 04 83 would give 42

82 60 00 22 83 would give B9

82 60 00 2F 83 would give 54

The C code is below:

The following section of the program explains the calculation of the CRC character. The type U8 is a 8 bit variable unsigned integer (0 through 255)

The function put_tx1_buffer ( U8 c ) send the characters via the serial interface.

#define POLYNOM 0xB1 // 28+27+25+24+20+1

#define INIT_TX_CRC {tx_crc=0xA5;} U8 tx_crc ;

void build_tx_crc8( U8 a )


U8 i=8 ;



if (( a & 0x01 ) != ( tx_crc & 0x01 ))


tx_crc >>= 1 ;

tx_crc ^= POLYNOM ;




tx_crc >>= 1 ;


a >>= 1 ;


while (--i!=0) ;


void set_lamp( U8 keyboardnumber, U8 lampnumber, U8 command )



put_tx1_buffer( STX+0x80 ) ;

build_tx_crc8( STX+0x80 ) ;

put_tx1_buffer( command ) ;

build_tx_crc8( command ) ;

put_tx1_buffer( keyboardnumber ) ;

build_tx_crc8( keyboardnumber ) ;

put_tx1_buffer( lampnumber ) ;

build_tx_crc8( lampnumber ) ;

put_tx1_buffer( ETX+0x80 ) ;

build_tx_crc8( ETX+0x80 ) ;

put_tx1_buffer( tx_crc ) ;


Kỹ năng: Lập trình C, Visual Basic

Xem thêm: write software reviews, looking someone write software, write software brochure, write software requirement specification, write software mobile, msr206 write software demo, someone write software, find someone write software, write software gps system, write software iphone gps, need someone write software

Về Bên Thuê:
( 0 nhận xét ) Forest Hill, United Kingdom

Mã Dự Án: #14889411

Đã trao cho:


Hello. I have much experience in converting code from one programming language to another programming language, including converting C/C++ to VB6. I know both programming languages very well and I know significant diff Thêm

£7 GBP / giờ
(971 Đánh Giá)

7 freelancer đang chào giá trung bình £8/giờ cho công việc này


Hello, I am a professional software developer proficient in C and VB6. I have read your project requirement, and i can quickly convert your C code to VB6 application. Or i can create a VM6 application to calculate CRC8 Thêm

£10 GBP / giờ
(30 Đánh Giá)

Hello, How are you? I have read your project description carefully I am very interested in this project. I have a lot of experience in this type of work. I'm sure I can complete it on time with high quality acco Thêm

£8 GBP / giờ
(1 Đánh Giá)

Hello,Sir High-Quality+fast development+good credit+fast communication=My work method! My first aim is to provide you quality and professional task. i have developed for 7 years on freelancer.com. This is my new Ac Thêm

£8 GBP / giờ
(1 Đánh Giá)

Greetings!I hope you are doing well. I have read your proposal and i have keen interest to work with you because my experience and my knowledge meet your requirements. I will provide good quality of work. Definately y Thêm

£8 GBP / giờ
(0 Đánh Giá)

Hi. I am a Senior VB6, VB.NET Developer living in Paris, I have read your specifications and i want to realize your application. i have already developed several applications you can find in my folio. I need more Thêm

£11 GBP / giờ
(0 Đánh Giá)
£5 GBP / giờ
(0 Đánh Giá)