Senior Project

UCF

New member
Not sure if the CFA735 is capable of doing this via CC2 so I wanted to ask. I am going to connect the 735 to a Single Board Computer (ARM9, Linux) that will also have a SSD attached to it. The object is to be able to view a file (most likely a .c or .txt file type) on the SSD via the 735 and be able to change variables in that file using the arrow keys (increasing/decreasing values) and then the green check to save the new file on the SSD. Can anybody tell me if that is possible? I know I should be able to read the file thanks to CC2's plug-in but changing the variables in the file is what might be difficult/impossible. Any help would be great, thanks!
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Mark

Administrator
Greetings,

First things first... how are you going to run CC2 on a ARM9 Linux SBC?
CC2 is only available for Windows, and x86.

Ignoring that problem, CC2 could view the file, but there is no way of having CC2 modify the contents of that file.

I think youll need to write your own software to interface with the 735 and display/modify the text file.
 

UCF

New member
I should have clarified that part, I'm currently working on the 735 via CC2 on a Windows machine. Once I have it programmed I will then connect it to the SBC. I will make sure the file's directory is the same on the Linux SBC as it is on my windows machine to make it easier to get updates. My current question is how to use CC2 to program the physical buttons? Any help with that would be great. Thanks.
 

CF Mark

Administrator
CC2 doesn't program the 735, it just sends and receives information from it.
The 735 is a relativity dumb display. You (PC software) tell it what to display, and listen for keypad button events.
You cant program the 735 itself to perform functions when buttons are pressed (well, at the moment you cant, that may change in the future).

You can find some information on how to set CC2 to perform functions when buttons are pressed in the example INI files found here:
C:\Program Files\CrystalControl2\documentation\plugin-info
Look at the "cc2_service.ini" and "lcd_635.ini" files.
 

UCF

New member
Physical Buttons

I looked at these files and I still don't know the values in these files work.

; -- 633 & 635 KEY VALUES ---------------------------
; UP = 1
; DOWN = 32
; LEFT = 8
; RIGHT = 16
; X = 4
; TICK = 2

If I un-comment this what will happen?

[module00]
;id for displaying to LCD
id=2302514254
;id for keypad events
id_keypad=333939127
;keypad repeat rate
key_repeat_rate=250

is the value for the id_keypad constantly updated when a user presses a key? for example pressing "UP" changes the id_keypad to '10' pressing down changes the id_keypad to '20' and so on....is this how I'm supposed to read in button actions? I appreciate your help. Thanks.
 

CF Mark

Administrator
With the module00 settings as above, when up is pressed, the 333939127 id will report a value of 1.
When down is pressed itll report a value of 32.
 

UCF

New member
With the module00 settings as above, when up is pressed, the 333939127 id will report a value of 1.
When down is pressed itll report a value of 32.


1) Should I un-comment the button values?
2) And to make sure I understand correctly you're telling me the "id_keypad" will change to either a 1 or 32 or 8 or 16 or 2?

Thanks
 

CF Mark

Administrator
1) Should I un-comment the button values?
No.
They are hard-coded, the comment in the file is just there for information.

2) And to make sure I understand correctly you're telling me the "id_keypad" will change to either a 1 or 32 or 8 or 16 or 2?
Correct.

So to use that, in cc2_service.ini you would do something like:

Code:
[m00-event00]
if_type=1
if=333939127
cond=0
to=32
do_type=9
do=1
Which would move the display to the next screen when the down button is pressed.
 

UCF

New member
Print to display

Ok so I have to create different modules such as:


[m00-event00]
if_type=1 //this will read in an "UP" and move "DOWN"
if=333939127
cond=0
to=32
do_type=9
do=1

[m00-event00] //this will read in a "DOWN" and move "UP"
if_type=32
if=333939127
cond=0
to=1
do_type=9
do=1

1) I do this for all possible button sequences?
2) Should I increment the header names (m00-event00, m00-event01, m00-event02)
3) How do I print to the display?

Thanks.
 

CF Mark

Administrator
Not quite... you want:
Code:
[m00-event00]
if_type=1
if=333939127
cond=0
to=32
do_type=9
do=1

[m00-event01]
if_type=1
if=333939127
cond=0
to=1
do_type=9
do=-1
1) I do this for all possible button sequences?
2) Should I increment the header names (m00-event00, m00-event01, m00-event02)
3) How do I print to the display?
1 - Depends on what you want the keypad to do
2 - Yes
4 - Print what?
 
Top