[sdiy] Program with C code comments in Chinese.. need traductions...

Jean-Pierre Desrochers sixcordes at oricom.ca
Thu Jan 30 21:34:29 CET 2020


 

Hi all,

Years ago I  bought a very nice development board

For Microchip controllers. Sold by a Chinese company.

This dev board came up with lots of HiTech C code examples.

The problem is that all the program comments were in Chinese (!!)
So whenever I try to understand some specific code lines

I could not figure out the comments associated to the code line.

I remember I’ve been able in the past to translate these Chinese comments

Using Microsoft Word, but cannot remember how I did it (??)

Here is the kind of code with comments I’m trying to trans late:

 

 

void interrupt init1(void)

{

            if(INTF==1)         //ÅжÏÖжϱê־λ

            {                                              

                        b=0x3f;            //ÖжϺó£¬Ç¿Ðн«Á÷Ë®¶¯×÷´ÓÍ·¿ªÊ¼

            }           

            INTF=0;             //ÒªÊÖ¹¤Çå³þÖжϱêÖ¾

}

 

 

void main(void)

{                      

            TRISB=0B11111111;            //RBÉèÖÃΪÊä³öÈë

            TRISD=0B00000000;            //RDÉèÖÃΪÊä³ö

            PORTD=0B00000000;       //ÃðµôV0-V7

            RBIE=0;                          //RB¿Úµçƽ±ä»¯ÖжϽûÖ¹

            INTEDG=0;               //ÉèÖÃϽµÑØ´¥·¢ÖÐ¶Ï      

            INTE=1;                      //ʹÄÜÍⲿÖжÏ

            GIE=1;                  //¿ª·ÅÈ«¾ÖÖжÏ

            while(1)

            {                      

                        if(++a>10000)    //ÑÓʱ10000¸öÈí¼þÖÜÆÚ£¬·Ç¾«È·¶¨Ê±

                        {

                                   a=0;        //ÇåÁãÒÔ±¸Ï´ÎÖØÐ¼ÆÊý

                                   b++;        //²½Öè²ÎÊý¼Ó1£¬ÒÔ½øÒ»²½

                        b&=0x3f;
//ÒòΪÎÒÃǶ¨ÒåµÄ±í¸ñ³¤¶ÈΪ64£¬ËùÒÔÕâÀïÐèÒªÏÞÖÆ²½Öè²ÎÊýÔÚ0-63¼ä

                                   PORTD=liushui[b];
//¸ù¾Ý²½Öè²ÎÊý²é±í¸ñ£¬½«²é³öµÄ²ÎÊý·ÅÈëÁÙʱ»º³å¼Ä´æÆ÷ÖÐ            

                        }    

            }

}

 

I know in this C code the lines are straight forward & evidents

purpose wise but this is just an example. 

I think the specific font used in Word  had a very high importance.. 
I tried many text translators on the web but no chances there.

Anybody have an easy translation way ?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20200130/7ddcb67b/attachment.htm>


More information about the Synth-diy mailing list