Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Atemu / AT_emulator.lib

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
Farmer

Bascom Member



Joined: 05 Jun 2011
Posts: 10

PostPosted: Wed Oct 15, 2014 9:09 pm    Post subject: Atemu / AT_emulator.lib Reply with quote

Hi,
i bought the PS2 emulator Library a while ago and sucessfully developed some Keyboard devices with it (using USB/PS2 converters).
I now want to use the Keyboard Status LEDs but i cant find any information if or how they are implemented.

Is it possible to use the status LEDs (Nun, cab,roll)?

Regards,

Tobi

(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5199
Location: Holland

blank.gif
PostPosted: Mon Oct 20, 2014 3:52 pm    Post subject: Reply with quote

I am not sure what you want. the ps2 emulator allows you to emulate a keyboard. Thus, you have some switches and a micro that will behave like a normal ps/2 keyboard.
But from your question i understand that you want to light up the leds from a normal keyboard.
Or do you mean that you want to add a led to your circuit and use that as num lock indicator?
Or did you use a normal keyboard and and the emulator?

_________________
Mark
Back to top
View user's profile Visit poster's website
Farmer

Bascom Member



Joined: 05 Jun 2011
Posts: 10

PostPosted: Tue Oct 21, 2014 6:03 pm    Post subject: Reply with quote

Hi,
in the past i used Atmegas as a Keyboard replacement. Now i need the 3 status leds for another project.
In the meantime i took a look into the AT_simulator lib an there are no routines for the LEDs in the lib.
Seems i have to change the lib and add a few lines for the LED. Should not be a big problem.

Are there other informations for .lib writing than in the help files? I would like to expand the Config Atemu line for the additional LEDS settings but dont know under which variable the settings from the config line appear in the .lib.


Regards,

Tobias
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5199
Location: Holland

blank.gif
PostPosted: Tue Oct 21, 2014 8:01 pm    Post subject: Reply with quote

So i you want to control the leds of a keyboard.
Getatkbd and getatkbdraw can be used to communicate with a keyboard. ( to process key presses ). What you need to add is code that will send data to the keyboard.

You can take code from the emulator lib to do so.
Here you find more info : http://retired.beyondlogic.org/keyboard/keybrd.htm

About libs : you can not expand config commands since these are processed by the compiler.
A safe way to experiment with libs is by making a copy of the lib for example copy the lib file to : myExperiment.lib
then include the lib in the code with $lib "myExperiment.lib"
The compiler will find this lib first and use the code from this lib.
The libs contain atmel asm. There are some extensions. Have a look at the mcs.lib and other libs.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum