sio port

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

sio port

Post by phobox »

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
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

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.
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

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
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

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)
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

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
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

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
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

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)
Post Reply