Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. int zad2(void) {
  2. unsigned char text1[] = {"Programowanie w "};
  3. unsigned char text2[] = {"ARM jest "};
  4. unsigned char text3[] = {"atwe"};
  5. int text1Lenght = sizeof(text1) / sizeof(text1[0]);
  6. int text2Lenght = sizeof(text2) / sizeof(text2[0]);
  7. int text3Lenght = sizeof(text3) / sizeof(text3[0]);
  8. unsigned char polskieL[8] = {
  9. 0x0C, // . 3 3 . .
  10. 0x04, // . . 3 . .
  11. 0x06, // . . 3 3 .
  12. 0x04, // . . 3 . .
  13. 0x0c, // . 3 3 . .
  14. 0x04, // . . 3 . .
  15. 0x1F, // 3 3 3 3 3
  16. 0x00 // . . . . .
  17. };
  18. int i = 0;
  19. RCC_Config();
  20. GPIO_Config();
  21.  
  22. LCD_Initialize();
  23. LCD_WriteCommand(LCD_CLEAR);
  24. LCD_WriteCommand(LCD_CGRAM_SET);
  25. delay(64000);
  26. for(i = 0; i < 8; i++) {
  27. LCD_WriteData(polskieL[i]);
  28. }
  29. delay(64000);
  30. LCD_WriteCommand(LCD_DDRAM_SET);
  31. delay(64000);
  32. for (i = 0; i < text1Lenght - 1; i++) { // Wypisz tekst
  33. LCD_WriteData(text1[i]);
  34. }
  35. delay(64000);
  36. LCD_WriteCommand(0xC0);
  37. delay(64000);
  38. for (i = 0; i < text2Lenght - 1; i++) { // Wypisz tekst
  39. LCD_WriteData(text2[i]);
  40. }
  41. delay(64000);
  42. LCD_WriteData(0x00);
  43. delay(64000);
  44. for (i = 0; i < text3Lenght - 1; i++) { // Wypisz tekst
  45. LCD_WriteData(text3[i]);
  46. }
  47. while(1);
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement