Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 15:56 07 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : [MMBasic]I2C Keypad Lib Added

Author Message
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 11:32am 20 Aug 2014
Copy link to clipboard 
Print this post

Hi

An interrupt driven I2C Keypad Library has been added to the G8JCF lib suite, together with a bug fixed I2C LCD Library.

@BigMik has reported that these two libs work with the MUP/I/O Panel boards.

These libs are available from http://www.g8jcf.dyndns.org/mmbasic/

When Geoff releases the '170 uMite MMBasic with large memory, and increased SUB/Function limits, libraries will really come into their own

Hope these prove interesting and useful.

Peter

The only Konstant is Change
 
halldave

Senior Member

Joined: 04/05/2014
Location: Australia
Posts: 121
Posted: 12:49pm 20 Aug 2014
Copy link to clipboard 
Print this post

Peter

Both of these are fantastic libraries

Well Done.

regards

David
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 03:27pm 20 Aug 2014
Copy link to clipboard 
Print this post

Awesome..!!

I love good LIB's and the people that write them...! This helps everyone get hardware interfaced sooner and get a project pulled together faster... After all, that's what the MM is about... Sure helps out the dummies like myself to get the job done... Thanks much Gent's for all the fine work..!!
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 03:43pm 20 Aug 2014
Copy link to clipboard 
Print this post

Very nice work there Peter! A BIG THANK YOU!
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:15am 21 Aug 2014
Copy link to clipboard 
Print this post

Thanks everybody for the kind words.

Really helps spur me on to keep creating.

Peter
The only Konstant is Change
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:23am 23 Aug 2014
Copy link to clipboard 
Print this post

Hi Peter, just loaded the i2c lcd library. Works very well indeed. Since I was using i2c already for a rtc, this code just gained me 6 IO pins on a uMite 28 pin. Wonderful!!!!

Thanks again for your efforts!!!

I do have a quick question... Right after you 'Start I2C, you send CMD(&H33) and then CMD(&H32). What do those two do here?

Edited by viscomjim 2014-08-24
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:55pm 23 Aug 2014
Copy link to clipboard 
Print this post

Hi Jim

You had me confused there for a moment, I couldn't remember anything like those commands in the I2CKeyPad code, but then I remembered that they occur in the I2C LCD code. &H33 and &H32 are sent to turn the LCD from 8 bit data bus to 4 bit nibble bus.

BTW, in the latest version of the I2C LCD library I've moved the I2C OPEN statement out of the Library itself because if one has several I2C devices, eg Keypad and LCD, then only one (1) I2C OPEN statement must be issued. The latest version (5) is available for download from http://www.g8jcf.dyndns.org/mmbasic/

Very glad you like the Keypad and LCD libraries.

BTW, I'm going to add the capability for the ISR to buffer key presses into a byte (string) array so that key presses can't be lost if the main loop is off doing something for a very long time, eg 500mS.

Also, I am thinking of adding a Library call to enable the keycodes to be changed by the using program, eg something like KeyPad_I2C_LoadKeyCodes("123*456/789-C0.=")
The sequence is in rows, and 16 codes would have to be specified for the call.
Is there any demand for this, or are people happy to directly edit KeyPad_I2C_KeyCodes() and change the keycodes ?

73

Peter
Edited by G8JCF 2014-08-25
The only Konstant is Change
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024