There is a pre-programmed PIC called PAK-VI available from milford instuments. I beleive they cost around £25. I've used them in the past and seems to work fine.
There is a pre-programmed PIC called PAK-VI available from milford instuments. I beleive they cost around £25. I've used them in the past and seems to work fine.
srob:
$29.95 USDThere is a pre-programmed PIC called PAK-VI available from milford instuments. I beleive they cost around £25.
Yes I am familiar with this chip, and it certainly is an option. However when a person can go out and buy something like a PIC18F252 for about $8.00, put this ready-to-run piece of code into it, and still have 14K worth of programming space left, it really doesn't make much sense to do it the other way. The PAK-VI was really aimed more at a situation where a) you don't have an alternative method (i.e.; no keyboard code), or b) the existing processor is just not fast enough, or has enough memory to do this, and be able run your main program as well (i.e; BASIC Stamp).
Well I think I solved the "A" problem.
But don't get me wroung srob, it is always good to look at a problem from different angles and avail yourself of all the possible solutions.
Here is another update to the PS2 interface code. In this version I've added the ability to decode the Print Screen and Pause/Break keys. Also I've included an example of how to read the "alt" register and do something usefull. In the example a Ctrl+Alt+Delete key combo will do a Reset of your PIC. To really see this in action, initiate CapsLock, ScrollLock, or NumLock prior to the reset, and you should see the LED indicator turn off when the PIC re-initializes.
Last edited by mytekcontrols; - 11th November 2005 at 23:46.
On the last PS2 Keyboard Interface update (V1.2) I failed to mention that I moved KBDAT from PortB.3 to PortB.4
This allowed me to use the hardware PWM aspect of PortB.3 for something else. As I had stated in an earlier post, the KBDAT I/O line can be freely moved anywhere of your choosing, by simply changing one equate, and without impacting anything else in the code. I simply took advantage of this fact.
Thanks for all the time ur putting into this mytekcontrols.
I was thinking about the problem of fitting this onto a 16F84 (which will be a problem), and i remembered that the 16F84 has 64 bytes of EEPROM data memory. I wonder if I could put some of the lookup tables on that memory in order to free up program memory.
Kamikaze47:
Actually I have a self-serving interest in doing this as well. I am designing a product that incorporates this code (along with a lot of other stuff), and I find it gives me incentive to improve it when someone else is in need of the same thing.Thanks for all the time ur putting into this mytekcontrols
Kamikaze47:
Just curious. Any reason you are persistant on using this particular processor? You really would be much better off using an 18F series chip like the PIC18F252 or PIC18F2525. Does it have something to do with not having a programmer for these?I was thinking about the problem of fitting this onto a 16F84 (which will be a problem)
Kamikaze47:
You certainly could. But it will only be of value if can you preload the eeprom with the DATA function in PBP, or have some other way to do it through your programmer....i remembered that the 16F84 has 64 bytes of EEPROM data memory. I wonder if I could put some of the lookup tables on that memory in order to free up program memory
Have fun with your project, and the best of luck squeezing it into your F84. <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=615&stc=1&d=1131930010 " align="absmiddle">
There are 2 reasons I would like to get it going on the 16F84. First its the most avaliable chip to me (can get them at my local electronics store), and secondly ive got a programmer for it. However, if need be i could modify the programmer to suit a different processor.
Anyway, ive been through the code to get familiar with it, and changed anything that would be different for a 16F84 (i dont think i missed anything). When I compile I get these warnings:
warning: unable to fit variable fsave in requested bank 16.
warning: unable to fit variable t1 in requested bank 16.
warning: unable to fit variable ssave in requested bank 16.
warning: unable to fit variable wsave in requested bank 16.
warning: unable to fit variable kbcnt in requested bank 16.
warning: unable to fit variable kbcode in requested bank 16.
warning: unable to fit variable kbindxi in requested bank 16.
warning: unable to fit variable kbindxo in requested bank 16.
warning: unable to fit variable kbbuf in requested bank 16.
*edit* Was just reading the F84 data sheet and looks like it labels the banks Bank0 and Bank1, so I changed the BankA's to Bank0's and the warnings disapeared... Got a bunch of new errors now, so will have to look at whats happening with them![]()
Last edited by Kamikaze47; - 14th November 2005 at 18:32.
Well if you are successful, please post your completed code, i'd love to see it.
Bookmarks