forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

low level sio

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Sat Dec 20, 2008 4:11 am    Post subject: low level sio Reply with quote

i was wondering if it it possible to have a low level control on every pin of the remote control port.
i actually need the control only on one pin and i need to set or get a digital value (0=0v; 1=+2.5v, or another voltage).
i'm gonna create a simple hardware and i think the best way to communicate with the psp, since the simplicity of the communication portocol (plain binary), was this one.
is it possible?
how is it possible, software side speaking, to read and set these values?
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Dec 20, 2008 7:06 am    Post subject: Reply with quote

The only lines you can control on the serial port are the serial transmit and receive data lines. Search for threads on serial, and look at the serial code in pikey for examples of sending and receiving serial data.
Back to top
View user's profile Send private message AIM Address
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sat Dec 20, 2008 6:57 pm    Post subject: Reply with quote

You would probably have much better speed if your hardware had a serial IO as well.
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Dec 20, 2008 8:28 pm    Post subject: Reply with quote

don't know if this helps, but you could use one of the audio-out channels...
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Dec 20, 2008 8:29 pm    Post subject: Reply with quote

don't know if this helps, but you could use one of the audio-out channels...
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Dec 21, 2008 12:02 am    Post subject: Reply with quote

You could always turn on and off the power line (0 -> 2.5V if I recall, might be lower). But I don't think that would be amazingly sensible :P
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Dec 21, 2008 12:40 pm    Post subject: Reply with quote

If it had its own power supply, that might be helpful.
Back to top
View user's profile Send private message AIM Address
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Dec 21, 2008 10:46 pm    Post subject: Reply with quote

Well the issue is being a power pin it probably has a long stabilisation time due to the way it will be wired to sink into a resistive load, not especially useful from the point of view of signalling. Plus the inbuilt function has almost a 3 second power up time, though not sure if that is due to the function or inherent hardware limitations.

Perhaps you would be better off putting in an IR detector and using the IR port on the old PSPs which can be directly controlled :)
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Mon Dec 22, 2008 6:20 am    Post subject: Reply with quote

thanks very much guys!
i think that the power pin solution isn't good at all for my matter: i read of about 3 secs of time to change state: not good, my signal changes state in about 50 microseconds, so....
and anyway this(and the audio out one) is a way to send data, no to receve.

the ir port solution sounds good, but is it that fast?

so i think the solution would be to implement the serial protocol, but i don't know much about it.... i can see that the sdk gives me a function:
void pspDebugSioPutchar(int ch);

and the sister one:
int pspDebugSioGetchar(void);

but, a char is made of 8 bits, and what i need to get is the time elapsed between the changes of state, like this:

an impulse consist in a digital 0 for a little time and then digital 1.

-first impulse
-pause of (let's say) 1 sec
-second impulse
-pause of 2 secs
-3rd impulse
-pause of 2 secs
-4th impulse
-pause of 1 sec
-5th impulse
-pause of 2 secs
6th impulse

a pause of 1 sec means a digital 1 and a pause of 2 secs means a digital 0.

this sends 5 bits (the first impulse is the start one)
the second impulse since the time elapsed from the previous impulse is 1 sec corresponds to a digital 1.
with this in mind:
3rd impulse: 0
4th impulse: 0
5th impulse: 1
6th impulse: 0

so the data sent is: 10010

how to decode this via software, i do not mean the algorythm, but i need the communication port and the low level functions.


i hope it was clear!
thanks
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Mon Dec 22, 2008 8:28 am    Post subject: Reply with quote

Quote:
and anyway this(and the audio out one) is a way to send data, no to receve.

No, but you can use the audio input to receive much quicker than you're talking about.
I'd look at the original recording example.
_________________
If not actually, then potentially.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Dec 22, 2008 9:30 am    Post subject: Reply with quote

The serial is "standard" asynchronous serial in an 8N1 format (8 data bit, no parity, and 1 stop bit). This is the old standard used by things like RS232. If I remember correctly, the default baud rate is 2400, but it can be changed. There are threads on it here, so use the search for them. If you really need 50 usec response time, I don't think serial will do it for you. You might have to go with the audio lines. Your other choice is to put a USB host device on your project and use the PSP USB.
Back to top
View user's profile Send private message AIM Address
Phantom8



Joined: 17 Jun 2005
Posts: 30

PostPosted: Mon Dec 22, 2008 9:56 pm    Post subject: Reply with quote

Not sure if the PSP serial port has any one of the DTR, DSR, CD, CTS or RTS. If so, it will very easy to just control these pins.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Dec 23, 2008 8:26 am    Post subject: Reply with quote

No, it doesn't. That's why I said the SERIAL was the same, not the control lines.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group