hd44780 not working in 4-bit mode with the LCD from Arduino Starter Kit

Đang mở
#646 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
embedded-iot

Hướng nghiên cứu

Start with the example in countdown-lcd-1602-4bits/main.go and the hd44780 driver, then reproduce the gibberish on the linked Wokwi circuit using the reported TinyGo version. Compare its 4-bit behavior with the Arduino LiquidCrystal example; done means the LCD displays the expected countdown text reliably on both listed displays.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The code exhibiting the problem is pretty much a hello-world type (from here)

package main

import (
	"bytes"
	m "machine"
	"strconv"
	"time"

	"tinygo.org/x/drivers/hd44780"
)

func main() {
	m.Serial.Configure(m.UARTConfig{BaudRate: 9600})
	lcd, err := hd44780.NewGPIO4Bit([]m.Pin{m.D5, m.D4, m.D3, m.D2}, m.D11, m.D12, m.NoPin)
	if err != nil {
		println("error: create LCD", err.Error())
		return
	}
	if err := lcd.Configure(hd44780.Config{Width: 16, Height: 2}); err != nil {
		println("error: configure LCD", err.Error())
		return

	}

	println("Start")
	lcd.Write([]byte("Countdown:"))
	lcd.Display()
	time.Sleep(1 * time.Second)
	
	// snip

It happens with latest version (v0.26.0), on both:

The easiest way to reproduce the issue is with a virtual circuit on wokwi.com (such as this one), by pressing F1 there, then selecting Upload Firmware and Start Simulation and uploading the tinygo built hex file. The mis-behavior is of random "gibberish" showing up on the LCD.

Th expected behavior of the virtual circuit should be like exhibited by this one - programmed with the Arduino LiquidCrystal library.

Possibly related to #380?

Ngôn ngữ chính
Go
Star
756
Fork
251
Merge trung bình
7 ngày 12 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinygo-org/drivers

Tất cả issue của tinygo-org/drivers

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.