<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 09 Jan 2012 18:37:09 -0800
From   : conrad.russo@... (Conrad Russo)
Subject: Fwd: Re: Not Exactly a BBC Question But...

Thank you very much Nicola! I really appreciate it! Once the computer
arrives I will try it out. I have a friend in San Fransisco putting
together a PS/2 adapter for the computer, but even if that works, I want to
set up a way to do it with a Beeb, just so it becomes more accessible to
people. I know of at least one person in the UK who has an FM77AV with no
keyboard. Even though my friend is building an adapter for me, it's very
possible that he will be unable or unwilling to either start selling the
adapters or release the code and design into the public domain, so if that
happens I would like to find a way to do it with a Beeb. I have not spoken
with my friend at all about what the future of this design will be, but it
is based on previous work by him, so he may wish to keep it between him and
me. Even if it does get released in some form, I would still like to use a
Beeb as a keyboard for it, for no other reason then because I can. :) Thank
you again Nicola for all your help. I really really appreciate it!

Conrad

On Mon, Jan 9, 2012 at 4:21 AM, nicola giacobbe
<nicolagiacobbe@...>wrote:

> Hello Conrad,
> sorry for the delay. I was out of town. Do you still need some code
> to start accessing the User Port? Anyway, here it is some simple
> code that could be taylored to suit your needs:
>
> ---------------start of code---------------
>
> 10 REM setting all User Port bits as outputs even if we are using B0 only
>
> 20 ?&FE62=&FF
>
> 30 REM the code to be sent is in byte array B%
>
> 40 DIM B% 8
>
> 50 DIM code% 256
>
> 60 FOR I%=0 TO 2 STEP 2
>
> 70 P% = code%
>
> 80 [OPT I%
>
> 90 LDA B%
>
> 100 JSR sendByte
>
> 110 LDA B%+1
>
> 120 JSR sendByte
>
> 130 LDA B%+2
>
> 120 JSR sendByte
>
> 130 LDA B%+3
>
> 120 JSR sendByte
>
> 130 LDA B%+4
>
> 120 JSR sendByte
>
> 130 LDA B%+5
>
> 140 RTS
>
> 150 .sendByte
>
> 160 LDX #8
>
> 170 .sendByteLoop
>
> 180 STA &FE60
>
> 190 JSR delay
>
> 200 LSR A
>
> 210 DEX
>
> 220 BNE sendByteLoop
>
> 230 RTS
>
> 240 .delay
>
> 250 LDY #55
>
> 260 .delayLoop
>
> 270 DEY
>
> 280 BNE delayLoop
>
> 290 RTS
>
> 300 ]
>
> 310 NEXT I%
>
> ---------------end of code---------------
>
> The delay code is a bit of a guess so you'll have to check for it
> generating a real 10KHz serial stream (but shouldn't be too far from the
> correct value, I hope). The code should be put in a vector and loaded
> in the B% byte array or the mode must be modified to pass the
> address of the data.
> Tell me if you need any change to the code and/or for any problem
> arising.
> Sincerely
>  nicola giacobbe
>
>
> On Sat, 07 Jan 2012 07:11:53 +0100, Conrad Russo <conrad.russo@...>
> wrote:
>
>  Thank you nicola, thursday next week I should be able to get to my Beebs.
>> Can you please send me some code to start out with?
>>
>> Chris, I'm not looking for someone to do it for me, but someone who is
>> willing to work together with me. I would be willing to pay to compensate
>> anyone for their time. I am just not experienced enough with coding to get
>> it done without help. The information I have is what is sent to the
>> computer when each key is pressed. I found a japanese blog where someone
>> took the first steps on this project, because they have a keyboard. From
>> what I understand they hooked up the keyboard to power, then recorded the
>> activity on the keyboards data line when they pushed each key, and also
>> how
>> it behaves when they push multiple keys. I don't have any images from an
>> oscilloscope or logic analyzer. I do know someone who has a keyboard, I
>> might be able to buy an arduino and load the oscilloscope sketch into it,
>> and send it to him to confirm the data rate and serial codes.  In the
>> meantime, I can try to feed the computer serial codes from a beeb as soon
>> as the computer arrives. I am so glad you guys are giving me so much help
>> with this.
>>
>> Conrad
>>
>> On Fri, Jan 6, 2012@... AM, Chris Thornley <
>> C.J.Thornley@...**co.uk <C.J.Thornley@...>>
>> wrote:
>>
>>  Hello,
>>>
>>> You mention a "uC/Arduino/(C)PLD based solution could really help" but
>>> this
>>> method might be considerably more expensive/complex than say using a 8051
>>> or
>>> PIC 16C84 or a BBC port and a few chips.
>>>
>>> It seems you are looking for someone to do this project for you?
>>>
>>> Are there any photos of the internal workings of a suitable keyboard?
>>> Do you have any oscilloscope or Logic Analyser traces of the signals sent
>>> from a working keyboard?
>>> Just wondering if the data is pure serial bits say from a shift register
>>> or
>>> has stop bit and start bits embedded.
>>> Is it definitely 10Kbps data rate or about this so might be 9.6Kbps
>>> instead?
>>> Does the keyboard send any strings to the computer when powered up to
>>> identify that it has been connected?
>>> Are there any keys which when pressed in combination send out a different
>>> codes?
>>>
>>> The Keyboard Babel website has a lot of information on how to get
>>> keyboard
>>> to talk to other machines and might prove useful
>>> http://www.kbdbabel.org/
>>>
>>> Some sort of simple serial (ASCII) to keyboard interface might be
>>> initially
>>> useful to test if things are working as expected before figuring out how
>>> to
>>> get an AT or other keyboard to talk to the machine.
>>>
>>> The 40bit codes seem to break down to 4 repeating nibbles :-
>>>
>>> 0011
>>> 0100
>>>
>>> 1011
>>> 1100
>>>
>>> This should make a lookup table easier.
>>>
>>> Chris
>>>
>>>
>>>
>>>
>>>              />      Christopher J. Thornley is
>>> c.j.thornley@...**co.uk <c.j.thornley@...>
>>>  (           //----------------------------**--------------------------,
>>>  (*)OXOXOXOXO(*>=*=C=J=T=-=-=-=***=---------
>>>   >
>>>  (           \\----------------------------**--------------------------'
>>>              \>       Home Page :-http://www.coolrose.fsnet.**co.uk>
>>>
>>>
>>>
>>>
>>> ______________________________**__
>>>
>>> From: bbc-micro-bounces+c.j.**thornley
>>> coolrose.fsnet.co.uk@...**cloud9.co.uk<coolrose.fsnet.co.uk at
lists.cloud9.co.uk>
>>> [mailto:bbc-micro-bounces+c.j.**thornley<bbc-micro-bounces%2Bc.j.thornley>
>>>
>>> coolrose.fsnet.co.uk@...**cloud9.co<coolrose.fsnet.co.uk@...>
>>> .
>>> uk] On Behalf Of Conrad Russo
>>> Sent: 06 January 2012 7:03 AM
>>> To: bbc-micro@...
>>> Subject: Re: [BBC-Micro] Fwd: Re: Not Exactly a BBC Question But...
>>>
>>>
>>> Yeah, what I'll try to do is to send some of the 40 bit serial code from
>>> the
>>> userport of my master to the FM77 at the proper rate and see if it
>>> recognizes it as keypresses. If that works, I'll move on from there. I
>>> might
>>> go another route though because both my beebs are in a room that is
>>> completely inaccessible right now due to renovations :(. I have two
>>> awesome
>>> beebs (and an Archie) that I haven't been able to use for a while now,
>>> it's
>>> upsetting! But back on topic, I have asked around on two keyboard forums
>>> to
>>> see if anyone can help out a bit with the practical side of things. There
>>> are so many people out there who have an FM77AV machine without a
>>> keyboard,
>>> a uC/Arduino/(C)PLD based solution could really help some people. I
>>> thought
>>> maybe of an Arduino Mini (the ones in a DIP formfactor) inserted into a
>>> small board with the appropriate connectors. I know lots of boardmaking
>>> houses offer a really good deal on small boards of a set size.
>>>
>>>
>>> On Thu, Jan 5, 2012@... PM, Rick Murray <rick@...> wrote:
>>>
>>>
>>>       Hi,
>>>
>>>       Sorry, mental hiccup, forget the PS/2 stuff. You want *something*
>>> that the FM77 thinks is a keyboard. You could try bit bashing on the user
>>> port (re. my previous message, just read FM77 where I wrote PS/2...).
>>>
>>>       Thing is to connect *anything* to the Japanese box is likely to
>>> require programming (the Arduino needs to know what to do, right?). If
>>> you
>>> can get the Beeb keyboard working, you're halfway there. If you can read
>>> a
>>> PS/2 keyboard and output FM77 on the Beeb, you'll have all the code ready
>>> to
>>> port over to the not-quite-C++ language the Arduino platform uses.
>>>
>>>
>>>
>>>       Best wishes,
>>>
>>>       Rick
>>>
>>>       (sent from my mobile)
>>>
>>>
>>>       -----Original message-----
>>>
>>>
>>>               From: Conrad Russo <conrad.russo@...>
>>>               To: Rick Murray <rick@...>
>>>               Sent: Fri, 06 Jan 2012, 07:36:42 CET
>>>               Subject: Re: [BBC-Micro] Fwd: Re: Not Exactly a BBC
>>> Question
>>> But...
>>>
>>>
>>>
>>>                       I think you misunderstood what I want to do, I want
>>> to hook up a PS/2 keyboard to an FM77AV, not the other way around.
>>> Forgive
>>> me if you already knew that, it's just that the way you described it
>>> (keyboard to microcontroller, microcontroller to PS/2 lead) sounds like
>>> you
>>> think I want to hook up a foreign keyboard to a PS/2 port. I think such
>>> things as PS/2 keyboard debouncing are well known. So all that would have
>>> to
>>> be done is read the PS/2 keyboard, convert PS/2 codes to 40-bit FM77
>>> serial
>>> stream, send to FM77. I think it's a little bit simpler then the other
>>> way
>>> around.
>>>
>>>
>>>
>>>               On Thu, Jan 5, 2012 at 10:29 PM, Rick Murray
>>> <rick@...> wrote:
>>>
>>>
>>>                       Hi,
>>>
>>>                       Arduino looks kinda cool. I might get myself one to
>>> play with (Farnell lists the Uno for ?20, but the spec is quite low,
>>> there
>>> is an ARM Olimex for ?24, or a Cortex-M3 with LCD, four buttons, serial,
>>> plus a fine spec for ?35. Not a RPi, but not a bad little mcu dev
>>> board.).
>>>
>>>
>>>                       But note, you still have to fiddle with hardware
>>> (keyboard to microcontroller, microcontroller to PS/2 lead) and software
>>> (scan keys, debounce, convert to PS/2, bitbash PS/2...) so for a quick
>>> fix
>>> you might as well wirea PS/2 plug to the User Port and try that first. If
>>> you can't get that going, give up on using a microcontroller, it won't be
>>> as
>>> easy to poke as BASIC!
>>>
>>>                       As for the keys and the Beeb's lack of them, there
>>> is always Ctrl key options.
>>>
>>>
>>>                       Best wishes,
>>>
>>>                       Rick
>>>
>>>                       (sent from my mobile)
>>>
>>>
>>>                       -----Original message-----
>>>
>>>
>>>                               From: Conrad Russo <conrad.russo@...
>>> >
>>>                               To: "bbc-micro@..."
>>> <bbc-micro@...>
>>>                               Sent: Fri, 06 Jan 2012, 00:03:01 CET
>>>                               Subject: [BBC-Micro] Fwd: Re: Not Exactly a
>>> BBC Question But...
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>