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 

sio port

 
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: Thu Apr 09, 2009 10:31 pm    Post subject: sio port Reply with quote

I need to comunicate with an hardware that i builded by myself. I think i can use the sio port, but i don'a want to use the serial protocol..i have my own protocol, i simply need to know when on one pin i have an high logic level and when not. I also need to set another pin to a desired logic level.. Can someone tell me how to do that? Thanks...
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Thu Apr 09, 2009 11:52 pm    Post subject: Reply with quote

If you find out let me know.
I'll bet a lot of those ppl sticking LEDs all over the place would like to know as well to power them directly off 2.5V from that port.
_________________
If not actually, then potentially.
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Fri Apr 10, 2009 6:34 am    Post subject: Reply with quote

what i actually need to do is to find a way to set the tx line for a desired time to a desired logic state; and to get the logic state at a desired moment of the rx line. is this possible using the simple serial protocol? or i need to add to my project a pic with serial support with an appropriate firmware?

i already had a look at pikey and sio sample of pspsdk, but that kind of use of the sio port is too high level.. isn't it?
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Fri Apr 10, 2009 8:40 am    Post subject: Reply with quote

Sorry, dude...don't know if there's a low-level "hidden" way to do that, but surely i can tell you there isn't an easy way to do what you want, and that's because you can't communicate directly with I/O port but you have to dialogue with an USART, so you can do on I/O port what the USART lets you do. Next step of yours could be to investigate the use of the audio port, but i suggest you to avoid this because audio port is filtered. If needed speed is not exagerated, you could use SIO power on/power off commands to signal a bit from PSP to the outside world...but this is definitely not professional. Good luck
(PS: a basic-level pic should cost about 3$, and is very easy to program...it could worth the pain to learn dealing with PICs)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Fri Apr 10, 2009 1:23 pm    Post subject: Reply with quote

You'll probably need to use the PIC. The 16F877A and some others directly have UART pins so no need for bit banging on the regular IO port to communicate serial. Use the Hi-Tech PICC compiler. It's got VERY SIMPLE examples on using UART and other stuff.
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Fri Apr 10, 2009 8:12 pm    Post subject: Reply with quote

Ok, i think i will use a pic. I already nave a 16f870 and i think it s ok..now my question is if i still need to use one 3232(that i cannot find) and one 232 on the pic side?..are the two levels compatible?
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Fri Apr 10, 2009 9:01 pm    Post subject: Reply with quote

The PIC's UART will anyway not function with the PSP's 2.5v port. The IO ports need 5v to trigger (When UART is activated on the 16f87x IO ports C6 and C7 become Tx and Rx).

You'll need to pull up the voltage anyway. If it doesn't work with the UART pins for some reason, there are plenty of software serial samples for PICs regular IO ports.
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Apr 11, 2009 6:59 am    Post subject: Reply with quote

Torch wrote:
The PIC's UART will anyway not function with the PSP's 2.5v port. The IO ports need 5v to trigger (When UART is activated on the 16f87x IO ports C6 and C7 become Tx and Rx).

You'll need to pull up the voltage anyway. If it doesn't work with the UART pins for some reason, there are plenty of software serial samples for PICs regular IO ports.

Nothing personal but that's definitely false. I succeded in connecting directly a normal pic...so it must be even easier with the new microampere family. The trick is in feeding the pic itself with something around 2.5/3 V
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sat Apr 11, 2009 11:39 am    Post subject: Reply with quote

I had problems activating an input pin with my 16F877A even with 4.4v input from other sources (due to low voltage from transformer).

jean wrote:
The trick is in feeding the pic itself with something around 2.5/3 V


But I was running the PIC with a perfect 5.00v from a USB port. I didn't know that reducing the voltage also reduced the threshold voltage of the schmidt triggers.

Even if it does work like this will it respond fast enough? Is there any additional delay in triggering on low voltage?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Apr 11, 2009 5:42 pm    Post subject: Reply with quote

Torch wrote:
Even if it does work like this will it respond fast enough? Is there any additional delay in triggering on low voltage?


Not enough to make a difference at serial speeds.
Back to top
View user's profile Send private message AIM Address
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Apr 11, 2009 6:54 pm    Post subject: Reply with quote

Quote:
Not enough to make a difference at serial speeds.

Exactly, in paricular when you use the usart.
To return up to pic power voltage, i must admit that Microchip's products are different from stock to stock and there's some exemplar that i wasn't able to program with my simple programmer, probably due to timing problem. Said that, try some of the new microAmpere family....or try using a max619 (4$ ordering 2 pieces)
Back to top
View user's profile Send private message
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