low level sio
low level sio
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?
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
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 :)
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 :)
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
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
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.