Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, AndrewAMD, Imhotep, TipmyPip, Edgar_Herrera), 809 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 3 of 7 1 2 3 4 5 6 7
Re: Serial Communications Header [Re: the_mehmaster] #282110
07/30/09 12:20
07/30/09 12:20
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I dont see why not, assuming the pic uses a decent serial routine,
and you connect via a max232 line driver for a guarantee, unreliable otherwise.

I dunno if I can just "throw" together even something that simple,
looking at my archives, I haven done any actual MP-Lab PIC coding since October 2003 !
Ive got the parts, but the skills may be a little weak. And Im on day-shift which limits my "play" time.

But I'll give it a try... Gimma a couple of days...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Serial Communications Header [Re: EvilSOB] #282230
07/30/09 21:08
07/30/09 21:08
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
My programmer was also my testbed (LEDs, SerialPort with max232, switches, lcd).
And it cost quite a bit too. I think I'll try and fix it before i buy a new one.

I'd like to see how you'll go though..smile

Re: Serial Communications Header [Re: the_mehmaster] #282235
07/30/09 22:11
07/30/09 22:11
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Definately fix first... PM me on this and I may be able to help fault-find.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Serial Communications Header [Re: EvilSOB] #283648
08/09/09 01:21
08/09/09 01:21
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
In response to 27 fault-finding PMs:
Originally Posted By: me
Yes!.. YEs!.. YES! It Works now!

All i did was resolder the ICSP header, And it works!

I've never missed a programmer so much.. I guess you can easily take things for granted smile

Couldn't have done it without you, evilSOB.. Thanks!

Now all i have to do is learn hitech C cool ..


Re: Serial Communications Header [Re: the_mehmaster] #285019
08/16/09 16:44
08/16/09 16:44
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline
Senior Member
kasimir  Offline
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
very interessting!

Does anyone test this code with USB?
Is it f.e. possible to check my mouse-input?

Re: Serial Communications Header [Re: kasimir] #285079
08/16/09 22:44
08/16/09 22:44
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I'd give you a hand if I could figure out the device name of the mouse.
According to the API documentation it SHOULD be able to.
Ive not played with and true USB devices yet.
I tested this code with a USB-to-Serial adapter, but windows recognised it as a
serial port, so it doesnt really count as a USB test like you are requesting.

I'll do a bit of digging and see what I can come up with though.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Serial Communications Header [Re: EvilSOB] #285723
08/19/09 19:23
08/19/09 19:23
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline
Senior Member
kasimir  Offline
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
thx,

if found following three commands, but i am not able to get them running:

Code:
usbhandle = CreateFile( ...USB PORT GUID...,
                    GENERIC_WRITE,
                    FILE_SHARE_WRITE,
                    NULL,
                    OPEN_EXISTING,
                    0,
                    0 );


-> here i get an error - GENERIC_WRITE, FILE_SHARE_WRITE, OPEN_EXISTING do not exist... ???

Code:
DeviceIoControl( usbhandle, 0x04, pIn, sizeof(szIn), pOut,
                        sizeof(szOut), lpByte, NULL );



0x04
pIn
szIn
pOut
szOut

...are specific port-functions/ bites to read...

and
Code:
CloseHandle( usbhandle );



Re: Serial Communications Header [Re: kasimir] #285782
08/20/09 04:21
08/20/09 04:21
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I dont follow what you are actually asking for questions 2 and 3.

But or question 1, here are all the "contants" I ever used.
I ended up hard-coding the values into the functions to reduce
the source-file complexity-of-reading.
Code:
#define GENERIC_READ	0x80000000
#define GENERIC_WRITE	0x40000000

#define FILE_SHARE_READ	0x1
#define FILE_SHARE_WRITE	0x2

#define CREATE_NEW 		0x1
#define CREATE_ALWAYS		0x2
#define OPEN_EXISTING		0x3
#define OPEN_ALWAYS		0x4
#define TRUNCATE_EXISTING		0x5

#define FILE_FLAG_OVERLAPPED	0x40000000

#define OF_READ	0x0
#define OF_WRITE	0x1



The problem with convrting my code to be USB friendly is
finding/retrieving the "...USB PORT GUID...".
I just cant figure out how...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Serial Communications Header [Re: EvilSOB] #285851
08/20/09 18:31
08/20/09 18:31
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline
Senior Member
kasimir  Offline
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
did you get this working (USB PORT GUID)???
i tried out some different desriptions, but nothing worked...

Re: Serial Communications Header [Re: kasimir] #285882
08/21/09 03:22
08/21/09 03:22
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I couldnt get enything to go.
But Im still VERY unsure if I was using the correct GUID.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 3 of 7 1 2 3 4 5 6 7

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1