PSP SIO Keyboard new approach or maybe an old one :P

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

Moderators: cheriff, TyRaNiD

Post Reply
terramir
Posts: 5
Joined: Fri Jan 25, 2008 6:54 pm

PSP SIO Keyboard new approach or maybe an old one :P

Post by terramir »

All the keyboard hacks I've seen so far have used some sort of chip and some sort of non serial keyboard (PS2 (pc), some other wierd keyboards that need an interface driver (IC Chip like the maxx) somehow.
I'm thinking well pikey works and well if I can make a custom charcter map somehow a pda keyboard hacked directly into the serial port should work. Most PDA keyboards and while they use custom chartermaps at times.
Usually use a serial interface like older jornada pda keyboards use standard serial connections vcc, gnd, rx, tx, and rts Haven't quite figured out what I should do with the rts since there dun seem to be a pin for that on the psp maybe from the vcc since I dun think I'll type fast enough to overflow the buffer that can handle a 19200 baud rate and defaults at 4800 as I understand it.
What do you guys think would a serial keyboard be an option that could work without a chip and 2ndly and more important how do I connect the rts since I think the keyboard will think the buffer is full if it dun have a pull-up ergo needs to have the 2.5V+ or as I understand serial connections it won't transmit.
Yeah I'm a noob and I dun code worth shit but usually I can get the hardware side done with enough research.
terramir
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Sounds like all the right answers to your own questions.
The IR keyboard has become a bit of a standard, and it just
seems more "like a bought one", although I haven't bought one.
Unless it's a slim. no there is no rts pin, but if you can get a keyboard
to send as you type, people type at a pretty slow rate.
If not actually, then potentially.
terramir
Posts: 5
Joined: Fri Jan 25, 2008 6:54 pm

Post by terramir »

got a big question though? I ran through this forum and I saw something about the sio turning off unless it got a signal from the remote, and something about a driver that keeps it on, however the biggest question is does piKey keep it on as well anyone got experiance in the respect?
terramir
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

I can't comment on other people's programs,
but if I write one that uses the serial port, it doesn't unexpectedly turn off.

Someone might make their program turn it off if no data was received in X amount of time.
If not actually, then potentially.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Yes the actual remote driver will turn off the power to the serial port if it doesn't get the response it expects but the sdk sio code just disables that driver anyway and reenables the power itself.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

To return to main topic...I managed to get a PS2 keybord work with PSP through SIO utilizing
1) batteries (i tried utilizing a MAX619 to elevate tension from 2.5 to 5V, but both PSP's SIO and MAX619 are not willing to feed enough current)
2) a homemade connector (not based on remote controller cord)
3) a PIC16F84 microcontroller programmed with a modified version of an old linux project (2nd keyboard over RS232 on PC)

Now, i know that handling such a DIY project is not for everyone, but you got to cosider that a palm-keyboard in my country can cost 80€, while an old PS2 can be obtained for nothing... the drivers for a serial keyboard are trivial, and could be added to those handlling IR keyboards already present.
Wouldn't be great if someone would produce a cable, like in the case of deniska's GPS hack???
terramir
Posts: 5
Joined: Fri Jan 25, 2008 6:54 pm

Post by terramir »

Jean great that you did it but is it supported in piKey?
Also can you post the code, and the schematic for other people. I will keep trying to do the serial myself right now, but I don't know if I will suceed.
I prefer not to have to lug around batteries, as for the remote cable i might just sacrifice it today and give it a try.
The biggest problem is that many ppl still have the phat psp, so they dun need to hack, just connect an IR keyboard so development is slim, since ir keyboards can be had for less that 20 bucks on eBay, right now I'm broke so I just want to hack something I already have.
As for making a cable, the problem is that in order to power a ps2 keyboard your gonna need batteries. But if you make your code open source and you work with the guys that are the creators of piKey maybe a vendor will pick up your development and make a readymade cable.
so post your code and stuffr and maybe someone will pick it up
terramir
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Pikey just uses pspirkeyb. As long as the keyboard is supported in that lib, it'll work with pikey no problem. Doing drivers for pspirkeyb is easy... well, SLIGHTLY harder if you do a GOOD handler. I've done one GOOD handler and adapted it to two other keyboards successfully.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Why are you trying to convert 2.5 Volts to 5 Volts?
To connect a PS2 Keyboard to the PSP wouldn't it be the other way round?

To convert a 5 Volt signal to around 2.5 for the PSP, use a resistor.
To convert 2.5 Volt signal to 5 Volts use a transistor.
You use the 2.5 Volt signal at the base to switch a 5 Volt supply.

There has been public PS2 keyboard converter code around for ages.
I never went that way because of the difference in size with the PSP.
Art.
If not actually, then potentially.
terramir
Posts: 5
Joined: Fri Jan 25, 2008 6:54 pm

Post by terramir »

I thought the ir lib is for ir keyboards right? this will be an sio, but actually I'm having a different sort of problem, the keyboard I got connected via sio when I hit keys I get a number followed by 24 when I let go the catch is that those numbers are not unique like when I hit 3 or 7 or e I get 46 and when I let go 24 seems like the debugging program in piKey is filtering out some info I need. and when I hit w the program just quits giving me numbers back after it spits out a 36 :s
anyone know of a different serial port program I could use to understand what is going on with this keyboard?
terramir
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

It's been for IR keyboards because nothing else has been available (except for the occasional DIY PS/2 keyboard). It would be easy to have it support things other than IR keyboards. Serial should be a snap since the IR keyboards are pretty much just plain serial keyboards.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

the keyboard I got connected via sio when I hit keys I get a number followed by 24 when I let go the catch is that those numbers are not unique like when I hit 3 or 7 or e I get 46 and when I let go 24 seems like the debugging program in piKey is filtering out some info I need.
Have you tested the setup with a Windows serial terminal?
Maybe the numbers you're seeing aren't correct at all.
That's how it sounds to me, none of the keyboard command sets have 0x24 in many codes, or even similar.

LUA player has a slow serial terminal, but you may only see the first char
for each keypress.

You might just need to invert the serial line from the pic.

I am assuming here, that the pic program is putting out the keyboard make and break codes that
aren't related to the symbols printed on the keyboard.
If not actually, then potentially.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

Also can you post the code, and the schematic
well...ok, just let me put toghether an howto (i just did it for myself..)...anyway i did not mention i have a phat PSP...as long as you own the serial connector, nothing should change
Why are you trying to convert 2.5 Volts to 5 Volts?
To connect a PS2 Keyboard to the PSP wouldn't it be the other way round?

To convert a 5 Volt signal to around 2.5 for the PSP, use a resistor.
To convert 2.5 Volt signal to 5 Volts use a transistor.
You use the 2.5 Volt signal at the base to switch a 5 Volt supply.

There has been public PS2 keyboard converter code around for ages.
I never went that way because of the difference in size with the PSP.
Art.
What?...No, i did not speak about the signal...through MAX619 i was trying to power the keyboard without batteries (and i miserably failed...thrust me, you can barely power a led with SIO) - google for 619 datasheets to better understand.
Oh, and just to be correct, to convert a 5v signal to a 2.5 one, it's better to use a voltage partitioner (i.e. 2 resistors in "T" configuration) or your load's current-drain will influence tension levels.
Serial should be a snap since the IR keyboards are pretty much just plain serial keyboards
I agree. In addition, it should not be too difficult to hack a IR keyboard to sio too (for slim owners)... even if IRCOMM (the serial-over-IRDA communication layer...the closest thing to serial you can find in irda) is pretty different from standard RS232 (the one we're using if you don't count the different voltage levels), it should be pretty easy to hack one of those keyboards to run on SIO, but unfortunately there should be a scheme for each piece, and not a universal one, so people without electronic skills have to find an electornics nerd :)

For what concerns SIO reading problems, depending on the speed you're running and the features of the other UART generating the signals you are reading, you could solve your problem as pointed out in this post: http://forums.ps2dev.org/viewtopic.php?t=9593
Anyway, it's not a good idea to test these things with Hyperterminal...it does terminal emulation and it can produce the code you're expecting or not, depending on your luck :)))

PS: i wanted to post for terramir a little crappy c# windows program to send data to serial port...everytime i've to upload, do i have to do it in some space of mine an then link?? It will not make people shout things like "SPAAAM!"???
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Spamming is like when someone includes a link to AVSoft on their question about installing the toolchain. Including a post to your own code/diagrams/whatever won't get any complaints of that sort. :) Plus, you have too many posts to be a spammer. Spammers always have 1 or 2 posts (depending on how many forums they've spammed).
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

MAYBE I GOT IT!!
3 or 4 months ago i bought an XBOX360 chatpad (i don't own an XBOX, let's say it is an hobby of mine to disassemble controllers) and obviously tried to reverse-eng it using my pc sound card as an oscilloscope. I gave up because of the bitrate being too fast for the soundcard to hold (i would have access to a real oscilloscope, but it's a pain in the ass to get access to laboratories in my campus). Nowadays i see other people with different skills has tried the same and confirm that chatpad protocol seems to be UART 8N1 (take a look at http://download.microsoft.com/download/ ... _0704A.pdf). Well, the good new is that this pretty little keyboard is retro-illuminated and looks wonderful, the bad one is that we'll never get it to work without additional power supply. I'll keep you updated if i manage to make it work with PSP throug SIO.

What do you say, Art...is it little enough??? I think it would be very good looking connected to my PSP!!! (anyway, the back plastic has to be cut...)

for the uploads: ok, so i will search the 20-alfanumeric-charachters password of my site that i lost somewere in my HD, upload and then post a link :)))
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

If you can get that keypad out of the controller it is a very nice component to start with, yes :)
I like IR because I use the serial port, but it looks like it could be as elegant.
If not actually, then potentially.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Looks cool! Here's a page showing how to disassemble the chatpad.
terramir
Posts: 5
Joined: Fri Jan 25, 2008 6:54 pm

Post by terramir »

holy crap jean, I read that other post before lol
the problem is even if I use your code that you post there I wouldn't have a clue how to compile it lol
what I need right now is a homebrew I can click on that turns the sio port on and gives me the raw data, because I need to figure out if the keyboard is just puking because of a connection error if it doesn't like the low voltage or if it's just plain broken. in order to investigate this I just need some homebrew I can spit out on the screento analyse my keystrokes in raw format. doing it in windows would mean lowering the voltage from the serial port cause I dun think this keyboard is meant for more than 4.2 volts.
That's why I was hoping the sio port could power it cause keyboards like that usually dun draw much power, well I still should have my targus stowaway (that should have a serial interface as well) maybe I'll have better luck with that one, once I find it. But I'll trouble shoot this one as long as I can.
terramir
PS: Art I have no pic controllers or anything this is directly hooked into sio from the keyboard's chip it's a serial interface so I figured it might just work, however I might just have a power problem here I dunno yet, might use 3xAAA to power the keyboard and a resistor bridge then I would only be using 3 wires the digital ground the rx and the tx, however one problem with that scenerio I'd have to resistor bridge the rx line boost the tx line and isolate the digital ground from the 5.1-3.4V from the batteries (fresh triple A can have a beginning voltage of 1.7V each).
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

waiting for the chatpad hack to work, let's get back to the ps2 keyboard thing...
just to avoid repeating the basics (and actually, to give credit) i'm not writing an howto on my own, but i will redirect you to this link: http://www.trash.net/~luethi/microchip/ ... _v1xx.html
You'll find everything you need but the new schematic (forgive me, i only had paint to modify the original one...i'm at work :)))

Image

hope it will help!

jean
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

I'd recommend something like the PIC16LF88 instead of the F84. It is mostly code compatible, has an internal oscillator, and can be run down to 2 V at 4 MHz. Since the keyboard bus is open-collector, you can probably run without any level conversion in that case. Also, it's cheaper.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

good point! I forgot there are people from the whole world here...in my country the 16f84 is widespread and cheap because of its very large use in seca-satellite era :)))) Anyway the problem remains the same: we still need to power supply the keyboard... it would be nice to cut off leds and completely replace a keyboard controller with a low power micro like that you pointed out utilizing only the contact matrix instead of just doing a conversion, but this is neither easy or quick to do. And, once again, schematics would change from model to model...
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

If you still have a 16f84 smartcard it is possible to use it by soldering
to the pads. You can also cut around the connector because the rest of
the card is just plastic. You can get a pretty small circuit that way, and
there are 3 IO ports.
If not actually, then potentially.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Do you still need a serial terminal?
I will do one if I find something convenient to connect to the PSP.
If not actually, then potentially.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

Post Reply