Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:37 29 Nov 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 : Micromite beta 7

     Page 3 of 7    
Author Message
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 02:28pm 20 Feb 2014
Copy link to clipboard 
Print this post

> It should only be a serial port with a 31.25K baudrate, right?

Right. The hardware UART will work,
but it would be elegant to have a
MIDIOUT command.
I.E.
MIDIOUT (byte1,byte2,byte3)
 
SteveP
Newbie

Joined: 21/03/2013
Location: United States
Posts: 19
Posted: 04:04pm 20 Feb 2014
Copy link to clipboard 
Print this post

  TZAdvantage said   A keypad that is connected uses a lot of pins, maybe a different wiring of the same keypad with some resistors to get a analog keypad that uses only one pin. This has been discussed in other topics before. It will make the 28pin version more capable.
Especially in combination with an LCD (Which also uses an amount of pins) this would work


Sparkfun now sells VKey Voltage Keypad 3x4 as part PRT-12080. It uses a constant current source and user comments discuss temperature effects.

https://www.sparkfun.com/products/12080

For LCD with fewer pins, serial communication can be used and Newhaven Display makes relatively inexpensive ones but it does then use up one of the two serial ports.

So maybe include support for software serial ?
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 04:33pm 20 Feb 2014
Copy link to clipboard 
Print this post

MicroMite Cell phone...

Works great - can make and receive voice calls using headset, best part is playing with SMS to control things...

So far I can tell you the keyboard routine works great, the LCD works great using 2004A, serial works.

This thing is great!

Thanks Geoff



 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 04:34pm 20 Feb 2014
Copy link to clipboard 
Print this post

A quick search on ebay for I2C LCD display.

http://www.ebay.com.au/sch/i.html?_trksid=m570.l3201&_nkw=lc d+display+i2c&_sacat=0

Lots of options, for I2C adapters, Displays with I2C adapters.

Don't know the difference in software to drive display direct Vs I2C?

But I agree with previous posters that at the moment direct connection of LCD and Keypad is wasting a lot of micromite pins.
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 07:12pm 20 Feb 2014
Copy link to clipboard 
Print this post


But I agree with previous posters that at the moment direct connection of LCD and Keypad is wasting a lot of micromite pins.


Seems like the reason for the uMite 44. Use 8 pins for keypad, 6 pins for LCD, you still have the original 19 pins you started with on the uMite 28. That's not bad, and besides you can use the IR receive instead of the keypad in many cases using only 1 pin.


Geoff, I like the temperature/humidity combo others have described. I miss the CLS in the uMite editor but F4 ESC works.

Thanks for the improvements in beta 7. I like the ultrasonic touch, a possible inexpensive aid for the blind.

Lou

Microcontrollers - the other white meat
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 07:17pm 20 Feb 2014
Copy link to clipboard 
Print this post

@ viscomjim - what cellphone module are you using, where did you get it, and what did it cost?

I have something like this in mind, and as the commercial SMS module is $400 a pop, I would be VERY interested in your module, especially as you seem to have got it going without much pain, so it would seem.

I would need to see if that module can talk to the New Zealand cellphone networks, but if you would please link me to it....
Smoke makes things work. When the smoke gets out, it stops!
 
viscomjim
Guru

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

Hi Grogster,

The GPRS/GSM module is called Efcom pro. The manufacturer is Elecfreaks.com It also comes as a shield (for maximite use). I paid $45.00 for it on ebay new. It uses the SIM900 module and simple AT commands like a hayes modem did back in the day. It will need a sim card to operate. I got a month to month cell plan with talk and SMS only, no data to keep it cheap ($5.00 month), however the unit can do data also if you want web connectivity. Using caller ID, you can do a simple operation (like open a gate) and never answer the phone, or use SMS and do whatever your heart desires. Make sure to use COM1 as it is 5v tolerant. I powered mine off a 5v 2A separate wall wart to play with as the data sheet says it can have up to 2 amp spikes once in a while. I guess larger cap could help with a smaller supply.
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 01:44am 21 Feb 2014
Copy link to clipboard 
Print this post

sometimes ago i used a gsm module with the maximite .
its really great and provides a lot of gsm info if you have the right AT commans for.
i use a 2,5 A power station for because the module needs moore power if the conection is miserable.
( works at home but not in my garage) . also it needs antenna tuning .
ill never tested internet connection with but for sms its great.
its a little bit like " build your own iphone" because u can also play games with the maximite if you will.
hahaha...

 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 02:33am 21 Feb 2014
Copy link to clipboard 
Print this post

geoff: see my last two posts in the original beta testing thread regard a few errors in the beta 7 manual and how to combine lcd and keypad on the same set of pins.

rob :-)
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 03:54am 21 Feb 2014
Copy link to clipboard 
Print this post

Got them thanks Rob.

The "combine lcd and keypad" will take a little thought. The keypad command sets the rows to inputs with pullups enabled and the columns as open collector outputs - neither are easily compatible with the LCD.

Geoff
Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 05:57am 21 Feb 2014
Copy link to clipboard 
Print this post

the simplest solution of combining LCD and KEYPAD pins would be to:

1) swap the column/row functions so that in both 4x4 and 3x4 cases there are 4 pins that are driven,
2) add a diode in series with each of the 4 driven pin, cathode end to the pin,
3) configure driven pins as DOUT (ie, not open collector),
3) connect d4..d7 directly to the driven pins.

the diodes would cause the driven pins appear as open-collector to the keypad, and prevent simultaneously pressed keys interfering with writes to the LCD module.

combined functionality could be exposed as an extension to the LCD command:
LCD INIT d4, d5, d6, d7, rs, en, var, int, c1, c2 [, c3 [, c4]]

at the same time, it could be useful for some applications to also update the keypad functionality so that c3 is optional in the case of using a 2x4 keypad. with a combined LCD + KEYPAD, 1x4 may even be a combination of use in some applications.


btw, you might like to look up "charlieplexing" using google. it allows 12 keys to be scanned with just 4 pins, 42 keys with just 7 pins, etc. the downside is that each key requires a series diode. the system was originally designed for driving LEDs, which provided the diodes for 'free'. it is neat, especially if someone were want to attach a complete set of alpha-numeric keys to a micromite, but may be a nightmare to code for!


rob :-)
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 11:14am 21 Feb 2014
Copy link to clipboard 
Print this post

  rob said  it is neat, especially if someone were want to attach a complete set of alpha-numeric keys to a micromite, but may be a nightmare to code for!


If you want a complete set of alpha numeric keys as data input, why not just use i2c direct then coding is dead simple - just a i2c read command. I have a ps2 to i2c module in my junk box if any interest.
David M.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 11:25am 21 Feb 2014
Copy link to clipboard 
Print this post

  viscomjim said  The GPRS/GSM module is called Efcom pro. The manufacturer is Elecfreaks.com It also comes as a shield (for maximite use). I paid $45.00 for it on ebay new. It uses the SIM900 module and simple AT commands like a hayes modem did back in the day. It will need a sim card to operate. I got a month to month cell plan with talk and SMS only, no data to keep it cheap ($5.00 month), however the unit can do data also if you want web connectivity. Using caller ID, you can do a simple operation (like open a gate) and never answer the phone, or use SMS and do whatever your heart desires. Make sure to use COM1 as it is 5v tolerant.


Awesome - thanks a bunch for replying. SIM cards are widely used here in NZ, and I am pretty sure the SIM900 will work as it is a quad-band cellphone module, but I will, naturally, need to check before I get too carried away. They are roughly $350 cheaper then the commercial unit I was going to use, so the cost saving alone makes it worth experimenting with.


Smoke makes things work. When the smoke gets out, it stops!
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 01:54pm 21 Feb 2014
Copy link to clipboard 
Print this post

Geoff quick question about Ds18b20 temp sensor function.

Sensor has resolution capability of 9-12 bits.
Current fixed resolution is 0.25 degreesC, this should be OK for most general use.
However, for more sensitive/precise application 12 bits would give 0.06 degC.

Do you have an option in Micromite firmware for resolution to be user specified?

For example DS18B20(pin, resolution)?

Regards
JohnL
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 02:43pm 21 Feb 2014
Copy link to clipboard 
Print this post

i'm lead to believe that the DS18B20 read routine takes around 200ms to return, during which interrupts may be lost. are there any other functions that similarly risk losing interrupts?

with the DS18B20 this could be avoided by having an extension to the function that returns a 'completed' flag, thus the following code example:

DO
temperature = DS18B20(pin, done)
LOOP UNTIL done
PRINT "Temperature: " temperature

the logic would be that upon first call to DS18B20 a conversion would be initiated and the function would immediately return with done set to FALSE. subsequent calls would similarly return with done set FALSE until the conversion is completed. at that point done would be returned set TRUE and the function would return the read temperature.

this would be compatible with the existing syntax, which would still introduce the 200ms delay when the done flag is not specified.


rob :-)

Edited by robert.rozee 2014-02-23
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 04:21pm 21 Feb 2014
Copy link to clipboard 
Print this post

Thanks fellows but my aim with the DS18B20 was to make it easy to use. Yes, I could have added options for improved resolution or a completion flag but that would have confused the casual user as both need inside knowledge of the DS18B20 to understand the consequences of using the options. I figured that if someone was technically adept to need these features they could drive the DS18B20 via BASIC anyway (there is a program in the MMBasic library to do just that).

Rob, a number of the "high level" functions will take some time, for example the IR transmit command. In general BASIC the only command that will block interrupts for an appreciable time is the INPUT command.

GeoffEdited by Geoffg 2014-02-23
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 06:08pm 21 Feb 2014
Copy link to clipboard 
Print this post

Missing word in manual Beta 7, page 11.

Just below the mention of Jim's MMEdit program, it reads:

  Quote  With the program held in flash memory it means that it will never lost, even
when the power is unexpectedly interrupted or the processor restarted.


Missing the word "be" between never and lost.

Edited by Grogster 2014-02-23
Smoke makes things work. When the smoke gets out, it stops!
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:24pm 21 Feb 2014
Copy link to clipboard 
Print this post

  JohnL said   Geoff quick question about Ds18b20 temp sensor function.

Sensor has resolution capability of 9-12 bits.
Current fixed resolution is 0.25 degreesC, this should be OK for most general use.
However, for more sensitive/precise application 12 bits would give 0.06 degC.

Do you have an option in Micromite firmware for resolution to be user specified?

For example DS18B20(pin, resolution)?



Hi
Here is a little bit of code for the UMite that will allow the above option


GetTemp 14, Temp, &H7F
Print "The temperature is:" Temp

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Subroutine to get the temperature from a Dallas DS18B20.
' Usage GetTemp (Pin number of DS18B20), (Temperature Variable), (Resolution)
' Resolution Table (Resolution Variable)
' &H1F = 9 bits 93.75ms Conversion Time
' &H3F = 10 Bits 187.5ms Conversion Time
' &H5F = 11 Bits 375ms Conversion Time
' &H7F = 12 Bits 750ms Conversion Time
' Temperature of 127 will be displayed
' in the case of a sensor fault
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub GetTemp (PinNbr, Value, Resolution)
Local TH, TL, b, t

OneWire Reset PinNbr ' reset
OneWire Write PinNbr, 2, 5, &HCC, &H4E, &H00, &H00, Resolution
OneWire Write PinNbr, 1, 2, &HCC, &H44

t=Timer
Do
If Timer - t > 1000 Then Error "Sensor Error"
OneWire Read PinNbr, 4, 1, b ' Conversion status
Loop Until b = 1

OneWire Write PinNbr, 1, 2, &HCC, &HBE
OneWire Read PinNbr, 2, 2, TL, TH

Value = ((TH And &b111) * 256 + TL) / 16
If T2 And &b1000 Then Value = -Value ' adjust if negative

End Sub


Sample output
The temperature is: 19.4375

Hope this helps
Jman
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6102
Posted: 09:04pm 22 Feb 2014
Copy link to clipboard 
Print this post

Error in the help file, Page 40:

OPTION BREAK 4 will set the break key to the CTRL-B key).

should read
OPTION BREAK 2 will set the break key to the CTRL-B key).
or
OPTION BREAK 4 will set the break key to the CTRL-D key).

Jim
VK7JH
MMedit   MMBasic Help
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3196
Posted: 06:12am 23 Feb 2014
Copy link to clipboard 
Print this post

Thanks Jim.
Geoff Graham - http://geoffg.net
 
     Page 3 of 7    
Print this page
© JAQ Software 2024