prakhar 0 Posted November 7, 2016 Share Posted November 7, 2016 (edited) 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? Edited November 7, 2016 by prakhar Link to post Share on other sites
0 Solution prakhar 0 Posted November 8, 2016 Author Solution Share Posted November 8, 2016 https://reference.digilentinc.com/pmod/pmod/cls/user_guide It has the instruction set. This is the thing I was looking for. Thanks Jon Link to post Share on other sites
1 jpeyron 660 Posted November 7, 2016 Share Posted November 7, 2016 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 prakhar 1 Link to post Share on other sites
Question
prakhar 0
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?
Edited by prakharLink to post
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now