From: santiago g. <san...@gm...> - 2009-09-15 01:28:52
|
Hi list... This comes from the help forum: Zoltan said: *"In ktechlab's source you can find in /src/electronics/port.h and .cpp the implementation. * *As I see, reading and writing is done by calling ioctl on the device. * *I don't know if setting the voltage on the port and seeing the change in ktchlab should work or not, but in my opinion it shouldn't be a something very complicated to do."* ** Ok... i had a look to port.cpp, and also to /src/electronics/components/parallelportcomponent.ccp and serialportcomponent.cpp Setting the voltage on the port works ok in serial port, but not with every pin.. in the code these inputs are comented as "doesn't work", all of them should work, but at least some of them works; but in parallel port, inputs (status) don't work, i think they should... i didn't find any problem in the code; i don't know very well the ioctl library, but all looks correct. Anyway i will try to find the problem. I found that data and control were also defined as inputs, but working like outputs ; i think this makes some erratic behaivors. (from the port point of view... an input to the port is "outputed" to ktechlab, then in ktechlab is defined as "createLogicOut"). I did some changes in parallelportcomponet.cpp and .h and i think now is working ok (data & control). I also did a workaround to solve the inverted values shown in ktechlab compared with the values present in the port, and now works ok for me. I think this is a very interestin feature, because is possible to interface a real circuit with a virtual one running in Ktechlab... I'm thinking in not simulate PIC but run the code in a real pic and conect it to a virtual circuit through parallel port. I did a try with a real pic managing a virtual led in kltechlab through serial port, working ok; but serial has just a few lines, with parallel i could interface two whole ports. I keep learning about ioctl... lets see if i find the way. * * |
From: Alan G. <ag...@sp...> - 2009-09-15 02:06:11
|
> I'm thinking in not simulate PIC but run the code in a real pic and > conect it to a virtual circuit through parallel port. I did a try with a > real pic managing a virtual led in kltechlab through serial port, > working ok; but serial has just a few lines, with parallel i could > interface two whole ports. Obviously, with a serial port, you'll need a receiver/demultipelxer/UART on the other end. -- New president: Here we go again... Chemistry.com: A total rip-off. Powers are not rights. |
From: santiago g. <san...@gm...> - 2009-09-15 02:16:18
|
No... is not a rs232 comunication... no protocol... you can just set or clear a pin, just like an electric conection. It can work just like a wire. 2009/9/15 Alan Grimes <ag...@sp...> > > I'm thinking in not simulate PIC but run the code in a real pic and > > conect it to a virtual circuit through parallel port. I did a try with a > > real pic managing a virtual led in kltechlab through serial port, > > working ok; but serial has just a few lines, with parallel i could > > interface two whole ports. > > Obviously, with a serial port, you'll need a receiver/demultipelxer/UART > on the other end. > > > -- > New president: Here we go again... > Chemistry.com: A total rip-off. > Powers are not rights. > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Ktechlab-devel mailing list > Kte...@li... > https://lists.sourceforge.net/lists/listinfo/ktechlab-devel > |
From: santiago g. <san...@gm...> - 2009-09-15 04:20:38
|
Ok... found the parallel port inputs (status) error.. the setHigh() operation was ORed with the readed value but it should be ANDed... now seting or clearing status pins in the real port is shown in ktechlab and can be conected to a ktl circuit... lets do some testings... :) About the serial port the only thing to interface a pic or any other circuit is a max232 or any other voltage adapter, depending on what the real circuits needs. 2009/9/15 santiago gonzalez <san...@gm...> > No... is not a rs232 comunication... no protocol... you can just set or > clear a pin, just like an electric conection. It can work just like a wire. > > 2009/9/15 Alan Grimes <ag...@sp...> > > > I'm thinking in not simulate PIC but run the code in a real pic and >> > conect it to a virtual circuit through parallel port. I did a try with a >> > real pic managing a virtual led in kltechlab through serial port, >> > working ok; but serial has just a few lines, with parallel i could >> > interface two whole ports. >> >> Obviously, with a serial port, you'll need a receiver/demultipelxer/UART >> on the other end. >> >> >> -- >> New president: Here we go again... >> Chemistry.com: A total rip-off. >> Powers are not rights. >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Ktechlab-devel mailing list >> Kte...@li... >> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel >> > > |
From: Zoltan P. <zol...@gm...> - 2009-09-15 09:03:37
|
If the code works well, send a patch and we could included in the official tree. Too bad I have only a laptop, which has only usb ports, so I can't test the parallel ports. 2009/9/15 santiago gonzalez <san...@gm...> > Ok... found the parallel port inputs (status) error.. the setHigh() > operation was ORed with the readed value but it should be ANDed... now > seting or clearing status pins in the real port is shown in ktechlab and can > be conected to a ktl circuit... lets do some testings... :) > > About the serial port the only thing to interface a pic or any other > circuit is a max232 or any other voltage adapter, depending on what the real > circuits needs. > > 2009/9/15 santiago gonzalez <san...@gm...> > >> No... is not a rs232 comunication... no protocol... you can just set or >> clear a pin, just like an electric conection. It can work just like a wire. >> >> 2009/9/15 Alan Grimes <ag...@sp...> >> >>> > I'm thinking in not simulate PIC but run the code in a real pic and >>> > conect it to a virtual circuit through parallel port. I did a try with >>> a >>> > real pic managing a virtual led in kltechlab through serial port, >>> > working ok; but serial has just a few lines, with parallel i could >>> > interface two whole ports. >>> >>> Obviously, with a serial port, you'll need a receiver/demultipelxer/UART >>> on the other end. >>> >>> >>> -- >>> New president: Here we go again... >>> Chemistry.com: A total rip-off. >>> Powers are not rights. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9-12, 2009. Register >>> now! >>> http://p.sf.net/sfu/devconf >>> _______________________________________________ >>> Ktechlab-devel mailing list >>> Kte...@li... >>> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel >>> >> >> > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Ktechlab-devel mailing list > Kte...@li... > https://lists.sourceforge.net/lists/listinfo/ktechlab-devel > > |
From: santiago g. <san...@gm...> - 2009-09-15 09:56:09
|
The code works well for me, but there are still some bugs: -when a parallel port is in the circuit if i try to open the "configure ktechlab" window , ktl freezes... no error messages in the terminal... just freezes. -If i try to add a new p-port to the circuit it freezes too. If you are not hurry to have the code i (or anyone) can try to find the errors. 2009/9/15 Zoltan Padrah <zol...@gm...> > > If the code works well, send a patch and we could included in the official > tree. > > Too bad I have only a laptop, which has only usb ports, so I can't test > the parallel ports. > > 2009/9/15 santiago gonzalez <san...@gm...> > >> Ok... found the parallel port inputs (status) error.. the setHigh() >> operation was ORed with the readed value but it should be ANDed... now >> seting or clearing status pins in the real port is shown in ktechlab and can >> be conected to a ktl circuit... lets do some testings... :) >> >> About the serial port the only thing to interface a pic or any other >> circuit is a max232 or any other voltage adapter, depending on what the real >> circuits needs. >> >> 2009/9/15 santiago gonzalez <san...@gm...> >> >>> No... is not a rs232 comunication... no protocol... you can just set or >>> clear a pin, just like an electric conection. It can work just like a wire. >>> >>> 2009/9/15 Alan Grimes <ag...@sp...> >>> >>>> > I'm thinking in not simulate PIC but run the code in a real pic and >>>> > conect it to a virtual circuit through parallel port. I did a try with >>>> a >>>> > real pic managing a virtual led in kltechlab through serial port, >>>> > working ok; but serial has just a few lines, with parallel i could >>>> > interface two whole ports. >>>> >>>> Obviously, with a serial port, you'll need a receiver/demultipelxer/UART >>>> on the other end. >>>> >>>> >>>> -- >>>> New president: Here we go again... >>>> Chemistry.com: A total rip-off. >>>> Powers are not rights. >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>>> is the only developer event you need to attend this year. Jumpstart your >>>> developing skills, take BlackBerry mobile applications to market and >>>> stay >>>> ahead of the curve. Join us from November 9-12, 2009. Register >>>> now! >>>> http://p.sf.net/sfu/devconf >>>> _______________________________________________ >>>> Ktechlab-devel mailing list >>>> Kte...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel >>>> >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Ktechlab-devel mailing list >> Kte...@li... >> https://lists.sourceforge.net/lists/listinfo/ktechlab-devel >> >> > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Ktechlab-devel mailing list > Kte...@li... > https://lists.sourceforge.net/lists/listinfo/ktechlab-devel > > |