Pages: [1]   Go Down
Author Topic: Simulating the LCD on PC - in progress  (Read 820 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Tesla Member
***
Karma: 76
Posts: 7307
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI, I am developing a way to simulating the functions of LCD (LiquidCrystal library) on a PC. This is relevant to those with some programming experience (c/c++/java etc.) on a PC (win/mac/linux) and can set up proper files and options to link library to your project code. The central purpose of this exercise is to simulate all non-hardware related code on PC for faster speed (no upload), use of debugger, and support of a better IDE for longer programs. Then with fully debugged code on PC, one can in principle copy paste to arduino and expect it to run on arduino. There are countless times where I ran into say using pointers without assigning a value and used it in arduino and it "worked". But on a PC, an exception will be thrown and I will investigate it and fix the code.

I am also making various arduino functions including PROGMEM stuff to work on PC by simply modifying Arduino.h

If you are interested, please read this post for updates and a list of currently supported functions in my little experiment.

http://arduino.cc/forum/index.php/topic,96197.0.html
Logged


Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 42
Posts: 5612
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI, I am developing a way to simulating the functions of LCD (LiquidCrystal library) on a PC. This is relevant to those with some programming experience (c/c++/java etc.) on a PC (win/mac/linux) and can set up proper files and options to link library to your project code. The central purpose of this exercise is to simulate all non-hardware related code on PC for faster speed (no upload), use of debugger, and support of a better IDE for longer programs. Then with fully debugged code on PC, one can in principle copy paste to arduino and expect it to run on arduino. There are countless times where I ran into say using pointers without assigning a value and used it in arduino and it "worked". But on a PC, an exception will be thrown and I will investigate it and fix the code.

I am also making various arduino functions including PROGMEM stuff to work on PC by simply modifying Arduino.h

If you are interested, please read this post for updates and a list of currently supported functions in my little experiment.

http://arduino.cc/forum/index.php/topic,96197.0.html

I saw the other thread; skimmed it, really (so if the following was addressed, my apologies): Will this project be cross-platform - that is, can we expect love for Mac and Linux users? smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 76
Posts: 7307
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

cr0sh,

Good question!

At the moment I am using the windows console buffer status info to control the movement of the LCD cursor, the windows Sleep to do the delay, and the windows FILETIME to derive time. It's a result of awesome internet search hits like "how to do delay in windows" smiley

I am pretty sure a port can be done with ANSI console (I prefer this than windows console) using escape sequence (I'm already using this in my phi-panel instructions), some generic Linux Sleep/delay, and epoch time (right term?) with linux. The rest is OS-independent. Since I don't have Mac or Linux, I'll need to enroll some help from those that do. Are you saying you're interested in checking out the project or maybe contributing a bit at various levels? From testing to porting. smiley

BTW, I was looking for a way to replace windows console with ansi console for Dev C++ but didn't find how to do it yet. If I do, I will port the LCD into using ANSI escape sequence.

I'll make a video if I have time tonight smiley
Logged


Norway
Offline Offline
Sr. Member
****
Karma: 4
Posts: 423
microscopic quantum convulsions of space-time
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
BTW, I was looking for a way to replace windows console with ansi console for Dev C++
I fiddled a bit with that some time ago, and found a program named "ansicon" that I ran with my program as argument. I didn't find that webpage now (old, nonexistant geocities page). A quick google came up with something similar, if not the very same: https://github.com/adoxa/ansicon

If it's the same I used, you need to have ansicon.exe and ansi.dll (now updated to ansi32.dll it seems, read the readme) in the PATH environment variable, or in the current directory where you run your program from.

Hope that helps.

Also, just in case, although rather unlikely, here is a (very old) explanation of how to use ansi.sys in windows NT: http://www.nthelp.com/40/ansiNT.htm.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 76
Posts: 7307
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks raron! I'll look into those.
Logged


Pages: [1]   Go Up
Jump to: