Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vfd.conf - correct pin numbers and Display Type setting #9

Closed
whoman321 opened this issue Jul 13, 2021 · 1 comment
Closed

vfd.conf - correct pin numbers and Display Type setting #9

whoman321 opened this issue Jul 13, 2021 · 1 comment

Comments

@whoman321
Copy link

Hi Arthur,
I'm using an RK3318 box with Linux (4.4 kernel), and have successfully compiled the driver and service, with systemctl successfully loading the module and launching the service.

I have been unsuccessful in unpacking the device-tree from the Android firmware to get the right pin numbers.

So I booted into Android, and ran the following command:

xxd -g4 /proc/device-tree/fd655_dev/clk-pin
00000000:0000008a 00000013 00000000

This shows that CLK is on pin 13

xxd -g4 /proc/device-tree/fd655_dev/dat-pin
00000000:0000008a 00000016 00000000

This shows that DAT is on pin 16

Those two pin numbers are consistent with other rk33x8 vfd pin settings that I've seen, and all of those have STB pin set to 12.

one thing to note though is the output of this command (in Android) gave completely different pin numbers:

cat /sys/kernel/debug/gpio

gpio

This shows that FD655_DEV is using:
pin 19 for CLK
pin 22 for DAT
(so I would assume pin 18 would be for STB?)

So, I took the vfd.conf for MINI ONE (which is for RK3229), and modified it with my pin numbers.

First I tried:

vfd_gpio_clk='4,13,0'
vfd_gpio_dat='4,16,0'
vfd_gpio_stb='4,12,0'

but nothing shows up when I restarted the service
I tried this command with numberous led names:
echo (led_name) > sys/class/leds/openvfd/led_on
still nothing on the display

Then I tried:

vfd_gpio_clk='4,19,0'
vfd_gpio_dat='4,22,0'
vfd_gpio_stb='4,18,0'

same thing. nothing shows up when restarting the service, and nothing happens when I try
echo (led_name) > sys/class/leds/openvfd/led_on

Could an incorrect DISPLAY TYPE setting cause this (nothing showing up on the display at all)?

I've tried many different variations of values for the DISPLAY TYPE, all with no success.

currently I have it set to:
vfd_display_type='0x00,0x00,0x00,0x00'

Do you have any ideas as to what I should be using in the vfd.conf file?

Here's what the display looks like:
vfd

Here's my dmesg:

[ 1624.464307] brightness = 0
[ 1624.512213] OpenVFD: Version: V1.3.0
[ 1624.512231] OpenVFD: vfd_gpio_clk:		#0 = 0x02; #1 = 0x0D; #2 = 0x00; 
[ 1624.512241] OpenVFD: vfd_gpio_dat:		#0 = 0x02; #1 = 0x10; #2 = 0x00; 
[ 1624.512250] OpenVFD: vfd_gpio_stb:		#0 = 0x02; #1 = 0x0C; #2 = 0x00; 
[ 1624.512259] OpenVFD: vfd_gpio0:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1624.512268] OpenVFD: vfd_gpio1:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1624.512277] OpenVFD: vfd_gpio2:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1624.512286] OpenVFD: vfd_gpio3:		#0 = 0x00; #1 = 0x00; #2 = 0xFF; 
[ 1624.512294] OpenVFD: vfd_gpio_protocol:	#0 = 0x00; #1 = 0x00; 
[ 1624.512305] OpenVFD: vfd_chars:		#0 = 0x02; #1 = 0x04; #2 = 0x03; #3 = 0x01; #4 = 0x00; 
[ 1624.512319] OpenVFD: vfd_dot_bits:		#0 = 0x00; #1 = 0x01; #2 = 0x04; #3 = 0x03; #4 = 0x02; #5 = 0x05; #6 = 0x06; 
[ 1624.512329] OpenVFD: vfd_display_type:	#0 = 0x00; #1 = 0x00; #2 = 0x00; #3 = 0x00; 
[ 1624.512340] OpenVFD: Detected gpio chips:	gpio0, gpio1, gpio2, gpio3.
[ 1624.512350] OpenVFD: "gpio0" chip found.	base = 0, pin count = 32, pin = 13, offset = 13
[ 1624.512358] OpenVFD: "gpio0" chip found.	base = 0, pin count = 32, pin = 16, offset = 16
[ 1624.512366] OpenVFD: "gpio0" chip found.	base = 0, pin count = 32, pin = 12, offset = 12
[ 1624.512372] OpenVFD: Skipping vfd_gpio0 evaluation (0xFF)
[ 1624.512377] OpenVFD: Skipping vfd_gpio1 evaluation (0xFF)
[ 1624.512382] OpenVFD: Skipping vfd_gpio2 evaluation (0xFF)
[ 1624.512387] OpenVFD: Skipping vfd_gpio3 evaluation (0xFF)
[ 1624.512907] OpenVFD: Select FD628 controller
[ 1624.512977] OpenVFD: SW SPI 3-wire interface intialized (LSB mode)
[ 1657.412215] brightness = 8

Note: dmesg shows "brightness" is set to zero, so I set it to 8, and still nothing.

Thanks so much for your time.

@whoman321
Copy link
Author

Solved by using this Display Type:
'0x02,0x00,0x00,0x06'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant