QC

Hiển Thị LCD 4 Bit Arduino

 

Nhớ tải thư viện : LiquidCrystal

  1. The circuit:
  2. * LCD RS pin to digital pin 12
  3. * LCD Enable pin to digital pin 11
  4. * LCD D4 pin to digital pin 5
  5. * LCD D5 pin to digital pin 4
  6. * LCD D6 pin to digital pin 3
  7. * LCD D7 pin to digital pin 2
  8. * LCD R/W pin to ground
  9. * 10K resistor:
  10. * ends to +5V and ground
  11. * wiper to LCD VO pin (pin 3)
  12. */
  13. // include the library code:
  14. #include <LiquidCrystal.h>
  15. // initialize the library with the numbers of the interface pins
  16. LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
  17. void setup() {
  18. // set up the LCD's number of columns and rows:
  19. lcd.begin(16, 2);
  20. // Print a message to the LCD.
  21. lcd.print("hello, world!");
  22. }
  23. void loop() {
  24. // Turn off the display:
  25. lcd.noDisplay();
  26. delay(500);
  27. // Turn on the display:
  28. lcd.display();
  29. delay(500);
  30. }

Nap Code vào PY32F003 dùng Stlink

 Nap Code vào PY32F003 dùng Stlink Bước 1: Cài đặt  KeilC v5.39 theo link sau ( chú ý 5.39 keil c mới nạp ok). https://edge07.111.ir.cdn.ir/...