خبریں
خبریں
MCU کا سب سے مضبوط مقبول سائنس کا خلاصہ [تجویز کردہ مجموعہ] (3)
2022-03-17 230
12،Overview of Chinese characters:
مانیٹر یا پرنٹر پر چینی حروف کو آؤٹ پٹ کرنے کے لیے، چینی حروف کو گرافک علامتوں کے مطابق ڈاٹ میٹرکس میں ڈیزائن کیا جاتا ہے، اور متعلقہ ڈاٹ میٹرکس کوڈ (گلیف کوڈ) حاصل کیا جاتا ہے۔  
The unified encoding method used to represent Chinese characters in computers is called internal code (such as national standard code), and the internal code is unique (equivalent to the ID number of the character). The Chinese character encoding formed to facilitate the input of Chinese characters is an input code, which is an external code of Chinese characters. The input code is different due to different encoding methods and is diverse. The Chinese character code formed for displaying and printing out Chinese characters is a glyph code. The computer finds the glyph code of the Chinese character in the font model library through the Chinese character internal code and realizes its conversion.  
  ان کیمرہ کوڈ  
According to the provisions of the national standard code, each Chinese character has a certain binary code, but this code will conflict with the ASCII code when processed internally by the computer. To solve this problem, add 1 to the first byte of each byte of the national standard code. Since the ASCII code only uses 7 bits, the "1" in the first place can be used as a mark to identify Chinese character codes. When the computer processes the code with "1" in the first place, it understands it as Chinese character information, and when it processes the code with "0" in the first place, it understands it as an ASCII code. The national standard code (internal code) processed in this way is the internal code.  
اگر ہم "" کی جگہ لے لیتے ہیں۔ اس "口" گرافک کا "0" کے ساتھ، ہم "口" کا گلیف کوڈ بہت واضح طور پر حاصل کر سکتے ہیں: 0000H 0004H 3FFAH 2004H 2004H 2004H 2004H 2004H 2004H 2004H 2004H 2004H 2004H 2004H 2004H 2004H 0000H 0000H جب کمپیوٹر "口" کو آؤٹ پٹ کرنا چاہتا ہے، تو وہ سب سے پہلے ڈسپلے فونٹ لائبریری کا پہلا پتہ تلاش کرتا ہے، "口" کے اندرونی کوڈ کی بنیاد پر حساب لگاتا ہے، اور پھر "口" کا گلیف کوڈ تلاش کرتا ہے، اور پھر کریکٹر جنریٹر کے کنٹرول کے ذریعے گلیف کوڈ (بائنری میں) کے مطابق ترتیب وار اسکرین کو اسکین کرتا ہے۔ جہاں بائنری کوڈ "0" ہے، وہ جگہ جہاں یہ "0" ہے اسکین کیا جاتا ہے، اور جس جگہ "1" ہے اسے نمایاں کرنے کے لیے اسکین کیا جاتا ہے، تو "口" کا کریکٹر پیٹرن حاصل کیا جا سکتا ہے۔  
چینی کریکٹر فونٹس کو قومی معیاری کوڈ کی ترتیب میں ترتیب دیا جاتا ہے اور بائنری فائلوں کی شکل میں میموری میں محفوظ کیا جاتا ہے، ایک چینی کریکٹر فونٹ لائبریری بناتی ہے، جسے چینی کریکٹر گلائف لائبریری بھی کہا جاتا ہے، یا چینی کریکٹر لائبریری۔
انکوڈنگ کے دو طریقے، ہیڈر فائل دیکھیں
    GB1616.h//------------------ Data structure definition of Chinese character font ------------------------//struct typFNT_GB16 //Chinese character font data structure { unsignedchar Index[3]; //Chinese character internal code index unsignedchar Msk[32]; //Dot matrix code data }; ///////////////////////////////////////////////////////////////////////////// Chinese character font table //// Chinese character library: Song style 16.dot, horizontal modulo left high bit, data arrangement: left to right, top to bottom ///////////////////////////////////////////////////////////////////////////// conststruct typFNT_GB16 codeGB_16[]= //Data table {/*------------------------------------------------------------------------------------------------ Source file/text: Xu; Width×Height (pixels):16×16---------------------------------------------------------------------------------*/ "Xu",0x10,0x80,0x10,0x80,0x21,0x40,0x42,0x20,0x94,0x10,0x1B,0xEC,0x20,0x80,0x60,0x8 0,0xAF,0xF8,0x20,0x80,0x22,0xA0,0x24,0x90,0x2A,0x88,0x21,0x00,0x00,0x00,0x00,0x00,
     

    This structure is very simple:One is the internal code, a dot matrix sequence. The previous dot matrix library was placed in the order of the internal code, and no internal code index was needed. If only some Chinese characters were placed, the internal code index was needed. (The Chinese character "Xu" in the front is to find the dot matrix sequence of the word when outputting "Xu". This dot matrix sequence is written by myself. When displayed with 1602, because the chip has an English dot matrix sequence in the memory, there is no need to write it.) Generally, two bytes are enough for the internal code. If you use one more byte, you just add a trailing 0. In this way, the Chinese character string can be directly placed in the Chinese character internal code;


    کوڈ جی بی_16 ایک ہی وقت میں، انڈیکس ایک صف ہے، اس لیے اسے انڈیکس کیا جا سکتا ہے[0] If((codeGB_16[k].Index[0]==c[0])&&(codeGB_16[k].Index[1]==c[1])) && ایک منطقی اور آپریٹر ہے، جس کا مطلب ہے کہ & علامت کے دونوں طرف کی اقدار درست ہیں۔ صرف && کی قدر صحیح ہے، یعنی سچا && true = true۔ اس جملے کا مطلب ہے: codeGB_16[k].Index[0]==c[0] اور codeGB_16[k].Index[1]==c[1] ایک ہی وقت میں قائم ہیں۔ اگر درج ذیل بیان پر عمل کیا جاتا ہے تو، codeGB_16[] ایک ڈھانچہ سرنی ہے، codeGB_16[k]. Index[0] کا مطلب ہے ساختی صف کے Kth ڈھانچے کے انڈیکس ممبر کی 0ویں عنصر کی قدر۔    

    13،12864 LCD:

    ہر ڈسپلے پوائنٹ بائنری نمبر سے مساوی ہے، 1 کا مطلب ہے آن، 0 کا مطلب آف ہے۔ ان ڈاٹ میٹرکس کی معلومات کو ذخیرہ کرنے والی RAM ڈسپلے ڈیٹا میموری کہلاتی ہے۔ کسی خاص گرافک یا چینی کردار کو ظاہر کرنے کے لیے متعلقہ ڈاٹ میٹرکس کی معلومات کو متعلقہ اسٹوریج یونٹ میں لکھنا ہے۔


    گرافکس RAM کا ایڈریس کاؤنٹر (AC) صرف خود بخود افقی ایڈریس (X محور) کو ایک کرکے بڑھا دے گا۔ جب افقی پتہ = 0FH، یہ 00H پر دوبارہ ترتیب دیا جائے گا۔ تاہم، یہ خود بخود کیری کے ساتھ عمودی ایڈریس میں اضافہ نہیں کرے گا۔ لہذا، جب متعدد ڈیٹا مسلسل لکھے جاتے ہیں، تو پروگرام کو یہ تعین کرنے کی ضرورت ہوتی ہے کہ آیا عمودی ایڈریس کو دوبارہ ترتیب دینے کی ضرورت ہے۔


      14،Graphics RAM (GDRAM)

    The drawing display RAM provides 128×8 bytes of memory space. When changing the drawing RAM, first write the horizontal and vertical coordinate values ​​continuously, and then write two bytes of data to the drawing RAM. The address counter (AC) will automatically increase the horizontal address (X address) by one. When the horizontal address is 0XFH, it will be reset to 00H; the vertical address will not be automatically incremented by 1. The drawing display must be turned off during writing to drawing RAM.

     
      [cpp] view plain copy//Display Chinese characters voiddispString (uchar X, Y,uchar *msg) //Which row is X and which column is Y. msg is Chinese characters { if(X==0) X = 0x80; // First line, Chinese characters display coordinates else if(X==1) write_data(*msg++); //Display Chinese characters } } ////////////////////////////////// //////////////// //////////////// // Display image voiddisppicture(uchar code *adder) { uint i,j; //*******Display the upper half screen content setting for(i=0;i<32;i++) // 32 column addresses in the upper half of the screen { write_com(0x80 + i); //SET vertical address VERTICALADD write_com(0x80); //SET horizontal address HORIZONTAL ADD for(j=0;j<16;j++) { write_data(*adder); adder++; } } //************Display the content settings of the lower half of the screen for(i=0;i<32;i++) // { write_com(0x80 + i); //SET vertical address VERTICALADD write_com(0x88); //SET horizontal address HORIZONTAL ADD for(j=0;j<16;j++) { write_data(*adder); adder++; } } }
       
         

      For the C language, space is automatically allocated for a defined variable, and its address is the name of the variable. Through this name, the data can be retrieved in the memory and new data can be obtained through calculation. However, in assembly, the programmer needs to define the storage space and send the data to the accumulator for calculation. Every step requires the programmer's operation. In C language, these processes are completed by the compiler.


        15،Some useful FAQs

      ① مائیکرو کنٹرولر سی زبان میں متغیر کی میموری ایلوکیشن کیسے کی جاتی ہے؟ کیا یہ ہو سکتا ہے کہ مرتب کرنے والا ذہانت سے تالیف کے عمل کے دوران مختص اور ری سائیکلنگ کوڈ کا اضافہ کرے؟ اہم نکتہ یہ ہے کہ جو پروگرام میں نے بنایا ہے، میں یہ کیسے یقینی بنا سکتا ہوں کہ اس میں میموری اوور فلو کی خرابیاں نہیں ہیں؟ اگر میں ایک بار بار چلنے والا آپریشن کر رہا ہوں، تو میموری کی ضروریات کا خود حساب لگانا مشکل ہے۔  
      ② کیا مائیکرو کنٹرولر سی زبان کو متغیر تعریف میں محدود رکھا جائے گا؟ مثال کے طور پر، فلوٹنگ پوائنٹ ڈیٹا کی ضرب اور تقسیم کی کارروائیاں اسمبلی کے ذریعے لکھی جاتی ہیں، اور کوڈ کافی پیچیدہ ہے۔ اگر سی زبان میں براہ راست لکھا جائے تو کیا یہ بہت آسان نہیں ہوگا؟  
      ③ مائیکرو کنٹرولر کی C زبان سے تیار کردہ ہیکس فائل میں، کیا ہدایات اور ڈیٹا ROM کی ایڈریس کی تقسیم خود کار طریقے سے مرتب کرنے والے کے ذریعے تفویض کی جاتی ہے؟ کیا صارفین اسے تفویض کر سکتے ہیں؟  
      Answer 1: The microcontroller program written in C language is first compiled by a program (it seems to be c51.exe). After the compilation is completed, the storage space size of the variables has been arranged, but the specific address has not yet been allocated (the address is floating). Next, another program (it seems to be a51.exe) is connected. After the connection, the specific address is determined.  
      اگر بہت زیادہ متغیرات ہیں تو، مرتب کرنے والا اشارہ کرے گا کہ ڈیٹا سیگمنٹ بہت بڑا ہے۔ اس بات کو یقینی بنانے کے لیے کہ میموری اوور فلو کی کوئی خرابی نہیں ہے، اہم غور یہ ہے کہ آیا اسٹیک اوور فلو ہے، اور یہ تجربے پر منحصر ہے۔
      مائیکرو کنٹرولرز کی سی زبان عام طور پر تکرار سے منع کرتی ہے، اور تکراری کارروائیوں سے عام طور پر گریز کیا جاتا ہے۔ سب کے بعد، مائیکرو کنٹرولرز پی سی نہیں ہیں، جو رفتار کو متاثر کرے گا. اگر آپ تکرار کرنا چاہتے ہیں تو ڈی ایس پی چپ استعمال کرنا زیادہ مناسب ہے۔ مختصراً، آپ کو مناسب چپ کا انتخاب کرنے کے قابل ہونا چاہیے۔
      جواب 2: متغیر کا سائز (ہندسوں کی تعداد) عام طور پر چپ جمع کرنے والے ہندسوں کی تعداد کے برابر ہوتا ہے۔ مثال کے طور پر، 51 عام طور پر 8 بٹس استعمال کرتا ہے کیونکہ یہ ایک 8 بٹ مائیکرو کنٹرولر ہے۔

      مائکروکنٹرولر بٹ متغیرات کی وضاحت کر سکتا ہے، لیکن یہ بٹ اری کی وضاحت نہیں کر سکتا۔ سی زبان میں لکھنا آسان لگتا ہے، لیکن اصل میں کوڈ کی سب سے زیادہ مقدار پیدا کرتا ہے۔ کنٹرول کے لیے استعمال ہونے والا مائیکرو کنٹرولر فلوٹنگ پوائنٹ آپریشنز کو مشکل سے استعمال کرتا ہے، جو نہ صرف سست ہے بلکہ پریشان کن ہے اور جگہ لیتا ہے۔ اگر یہ ڈی ایس پی چپ ہے، تو یہ زیادہ بہتر ہو گا اگر اس میں مناسب ہارڈ ویئر کا ڈھانچہ ہو۔  
       

      جواب 3: عام طور پر، یہ خود بخود مختص ہوجاتا ہے۔ اسے C زبان اور اسمبلی زبان کے مرکب میں پروگرام کیا جا سکتا ہے، یا اسے Keil C کا استعمال کرتے ہوئے آن لائن اسمبل کیا جا سکتا ہے۔ چپ اور باہر کے درمیان ڈیٹا کا تبادلہ بندرگاہ کے ذریعے کیا جاتا ہے۔


      دستبرداری: یہ مضمون "انٹرنیشنل الیکٹرانک بزنس انفارمیشن" سے دوبارہ تیار کیا گیا ہے۔ یہ مضمون صرف مصنف کے ذاتی خیالات کی نمائندگی کرتا ہے اور Sacco Micro اور صنعت کے خیالات کی نمائندگی نہیں کرتا ہے۔ یہ صرف دوبارہ پرنٹ کرنے اور اشتراک کرنے کے لیے ہے اور املاک دانش کے حقوق کے تحفظ کی حمایت کرتا ہے۔ دوبارہ پرنٹ کرنے کے لیے براہِ کرم اصل ماخذ اور مصنف کی نشاندہی کریں۔ اگر کوئی خلاف ورزی ہوتی ہے تو اسے حذف کرنے کے لیے ہم سے رابطہ کریں۔

      کمپنی کا فون نمبر: +86-0755-83044319
      فیکس/FAX: +86-0755-83975897
      ای میل: 1615456225@qq.com
      QQ: 3518641314 منیجر لی

      QQ: 332496225 منیجر Qiu

      پتہ: کمرہ 809، بلڈنگ سی، ژانتاو ٹیکنالوجی بلڈنگ، نمبر 1079 منزی ایونیو، لونگہوا نیو ڈسٹرکٹ، شینزین

      whatsapp

      Service Hotline

      tel: +86 755 83044319

      WhatsApp

      Whatsapp:+8618073002950