Silicon chip article on keyboards question

nzdragme

New Member
Hi, I'm just fairly new to picaxes and have been following through these great articles in silicon chip by a fellow kiwi. I have been trying to figure out how to convert the keyboard commands to the 28x1 style eg from this:
keyin
read keyvalue,b1
if keyvalue=$5A etc etc

to:
kbin ?

I am unsure how to do the kbin command in the place of the keyin part.
Can someone help please?:confused:
 

nzdragme

New Member
Someone must know how to do this? There are such amazing brains here, surely someone could help me please?
 

manuka

Senior Member
Well I for one have subject my own gray matter to excessive amber fluid over the years, so must reluctantly decline your "amazing brain" praise. However (& as you kindly mentioned my SiChip articles), I'm happy to help translate keyin/keybin setups, but will need to unearth 28X resources. PLEASE specify more about what you are trying to do! Stan.
 
Last edited:

nzdragme

New Member
The man himself! I have enjoyed all your articles.
I am trying to output from a keyboard, through a 28x1 to a serial lcd.
As I have very limited programming experience, I am having trouble working out the syntax of using the kbin command needed on the 28x1 to replace the keyin command in your program listing, keyb18xa.bas. Obviously I can't use the keyvalue term either which is part of my problem.
Hope this helps explain it. I think I can work out the rest eg. output to the lcd etc
Any help would be much appreciated.
 

manuka

Senior Member
Keyboard-28X1-LCD. Overview needed please. What are you trying to do overall? Why a 28X1 instead of 18A/X ?
 

nzdragme

New Member
Nothing overall sorry, I am just having a play and I guess I could just go buy an 18a/x but just wanted to use what I had here as I didn't think it was that hard to translate from keyin to kbin, which (I think) is all I need to know. Sorry if I'm missing some point here. I can answer anything else you may need to know. I just want to type and see it on the lcd, even if it's only one line of 16 characters, I just like the concept of being able to do so and have made it a learning project.
 

Technical

Technical Support
Staff member
Code:
keyin
read keyvalue,b1
if keyvalue=$5A...
becomes
Code:
symbol keyvalue = b15  ' define your own keyvalue variable
kbin keyvalue
read keyvalue,b1
if keyvalue=$5A...
 

nzdragme

New Member
I had trouble with the eeprom commands in the prog. listing after I changed the keyin parts so I took the easy way out and went and picked up an 18x. This will make it a bit easier for me to learn as I now have an 08m, an 18x and a 28x so can use most prog. listings as they are without converting them to diff model picaxes.
Thx again for the help and I shall let you know how I get on. I have a few projects in mind so will obviously be part of the furniture here for a while lol.
 

manuka

Senior Member
OK-good move, & akin to what I was going to offer myself. NB- do your home work on keyboards, as some older types are power hogs. I eventually found one that drew just ~3mA! Stan
 

nzdragme

New Member
Okay thx Stan. I'm using a computer power supply (the 5v line to the floppy and hard drives) so thought that it would be enough to power the picaxe, lcd and keyboard. Let me know if I am wrong here. Unfortunately I inadvertantly connected the 12v line to the lcd momentarily and blew the serial board. (Damn!) Pretty expensive smoke came out!
I guess it's another order to mailtronics who sell the boards in kit form for around $17 plus gst. Great service too, they delivered in two days on credit!!! If anyone would like a link, just ask. They have all sorts of goodies in their catalog and pretty much a full range of picaxe gear. They are based in auckland. Sorry if this is old news to you guys but I hadn't seen them mentioned anywhere.
 

manuka

Senior Member
Ouch-IMHO avoid 12V! I STRONGLY recommend 3 x AA batteries for initial PICAXE projects to prevent just such woes. Are you now making this following my Nov-Dec 2003 articles?



Mailtronics are indeed a handy NZ supplier but email responses are sadly very tardy, & bulk order queries I make to them often end up going to the more responsive "S" Ak. crowd.
 
Last edited:

nzdragme

New Member
Yes, Stan, I was "trying" to do that. I wasn't intentionally using 12volts! It was me not being used to using the yellow and black wires from the computer pwer supply which is 5volts. I accidently used the red and black wires which I forgot was 12v. By the time I noticed that magical smoke, it was too late. It even melted tracks on the serial lcd board, if only I had the jumper off that diverts it thru the 5volt reg!
 

nzdragme

New Member
I should have mentioned that I do have a 3 battery supply also but was worried about running the keyboard and lcd off the same supply due to noise and load etc
 

hippy

Ex-Staff (retired)
It was me not being used to using the yellow and black wires from the computer pwer supply which is 5volts. I accidently used the red and black wires which I forgot was 12v.
Red is +5V, Yellow is +12V, if it is a standard AT or ATX PSU.

I know DELL used to use a non-standard PSU configuration which would destroy non-DELL motherboards but that was connector pin re-assignment. maybe wrong colours as well. Either way I refuse to have anything to do with either PSU or M/B labelled DELL, they go straight in the bin.
 
Last edited:

nzdragme

New Member
Yes you are correct. That was a typo on my part. I have shifted my focus onto some L293 motor driver projects until I get another serial to parallel lcd board in the mail. Luckily there seem to be plenty of items that a parallel lcd display can be salvaged from and I have a few. The local recycle yard (super shed) have things like electronic typewriters that us the common hitachi based lcd displays. These usually are only 16x2 in my experience but that's still a good saving and there are plenty of other good components in there also. Has there ever been much discussion on salvaging components here?
 

hippy

Ex-Staff (retired)
Has there ever been much discussion on salvaging components here?
There's been some. A problem I find is that many components in mass-produced products are not clearly marked or OEM parts produced specifically for the job and there's little information to be found about them. Re-using salvaged components can therefore be frustrating and time consuming.

If others aren't likely to get the same parts themselves there's no great incentive to get involved in making them work so it's often a task for someone able to work on their own initiative.

I have no problem with using salvaged parts, but it has to be accepted that if there's not a ready source of those parts any project built around them is by definition a one-off and a liability of that part fails or gets damaged.

On the other hand, reusing widely available parts like Nokia LCD screens is very worthwhile and of benefit to many people. Likewise, salvaged industry standard components can be used almost without worry, the real bargain finds.
 

nzdragme

New Member
Yes I totally understand what you mean hippy. I hate finding a really good project only to find that the parts are impossible to get. Especially years ago before the 'net was used so much.
 

manuka

Senior Member
I advise running (initially) almost everything PICAXE related off 3 x AAs,& recall the only picky hardware being the Rev.Ed serial LCD. This needs a good 5½-6V, but even that can be lowered by bypassing the inbuilt diode. In today's "smell of an oily rag" electronics age even 5V is seen as luxurious of course- we have a responsibility (especially educationally) to keep circuitry lean, mean & green. (c.p- "other things being equal"). Stan
 
Top