Jump to content
  • 0

Code to use pmodcls


prakhar

Question

Hi all,

I downloaded this https://reference.digilentinc.com/_media/reference/pmod/pmodcls/pmodcls_demo.zip project and it outputs "Hello From Digilent" on pmodcls.

I am having a problem in understanding following code, please help.

type LOOKUP is array ( 0 to 33 ) of std_logic_vector (7 downto 0);

 -- Hexadecimal values below represent ASCII characters
    constant command : LOOKUP  := (  X"1B",
                                                X"5B",
                                                X"6A",
                                                X"1B",
                                                X"5B",
                                                X"30",
                                                X"3B",
                                                X"33",
                                                X"48",
                                                X"48",--'H'
                                                X"65",--'e'
                                                X"6C",--'l'
                                                X"6C",--'l'
                                                X"6F",--'o'
                                                X"20",
                                                X"46",--'F'
                                                X"72",--'r'
                                                X"6F",--'o'
                                                X"6D",--'m'
                                                X"1B",
                                                X"5B",
                                                X"31",
                                                X"3B",
                                                X"34",
                                                X"48",
                                                X"44",--'D'
                                                X"69",--'i'
                                                X"67",--'g'
                                                X"69",--'i'
                                                X"6C",--'l'
                                                X"65",--'e'
                                                X"6E",--'n'
                                                X"74",--'t'
                                                X"00");

I am not able to understand rest of characters used above.

What do characters in above code apart from "Hello From Digilent" mean and what is their use?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi prakhar,

Under the Interfacing with the Pmod section of the manuel here it describes that you need to send escape sequenses to accomplish different functions like setting the cursor location. So the extra asci chars sent is there to set up and print location of the phrase. I would suggest looking at the library and MPIDE Example code here. It containg alot of different things you can do like Toggle Backlight, Display Scroll left/right, Toggle cursor , Toggle blink and Erase chars. The PDF gives alot of information on what needs to be sent to accomplish these different functions. Hope this helps!

thank you,

Jon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...