Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:42 11 May 2025 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 : Armmite L4 battery miser, first beta

     Page 2 of 8    
Author Message
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 268
Posted: 09:06pm 09 Nov 2018
Copy link to clipboard 
Print this post

  matherp said  





Peter, I cannot "resist" asking; what melted and carbonised your prototyping board so spectacularly? I bet the house needed an air-freshener after that one...
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 09:12pm 09 Nov 2018
Copy link to clipboard 
Print this post

  Quote  DS11451 page 66 - 20mA


Thank you Peter that's the document that I had trouble locating.

OA47
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 10:25pm 09 Nov 2018
Copy link to clipboard 
Print this post

Just a small question if I may, does the PAUSE timer use the same clock as the RTC?
In a short program I have to pause 1020 mS to get the next RTC second. (If that makes sense)
OA47
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 10:35pm 09 Nov 2018
Copy link to clipboard 
Print this post

  Quote  what melted and carbonised your prototyping board so spectacularly?


De-soldering hot air gun fell off stand

  Quote  does the PAUSE timer use the same clock as the RTC?


No RTC is Xtal, Pause uses internal RC



 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 06:59am 10 Nov 2018
Copy link to clipboard 
Print this post

What am I doing wrong here?

SetTick 1000, BlinkLED

Do
Loop

Sub BlinkLED
Pulse 26,2
End Sub


run
[LIBRARY] Sub BlinkLED
Error: Duplicate name


OA47


 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 08:28am 10 Nov 2018
Copy link to clipboard 
Print this post

  Quote  What am I doing wrong here?


Nothing - works for me, try reflashing with attached in case I posted a corrupted version

2018-11-10_182831_ArmmiteL4.zip
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 08:33am 10 Nov 2018
Copy link to clipboard 
Print this post

It was me. I power cycled the mite and all is good now.
Sorry to annoy you so early in the morning Peter.
OA47
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1090
Posted: 09:03am 10 Nov 2018
Copy link to clipboard 
Print this post

So you "rectified" your problem then
ChopperP
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 936
Posted: 03:12pm 15 Nov 2018
Copy link to clipboard 
Print this post

Hi!

Is there a way to wake up the controller at a certain date/time (RTC)?

(After playing around with the board for a while, the RTC suddenly went wrong by a few minutes - but unfortunately can't reproduce the error...)

I also had a problem with the editor: I wanted to append a few "0" to a number whereupon the editor suddenly moved or deleted any other places in the code - leaving and calling the editor did not change anything. The code was displayed corrupted. Only a restart of the µC brought remedy - but the code was still intact...

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 04:33pm 15 Nov 2018
Copy link to clipboard 
Print this post

  Quote  Is there a way to wake up the controller at a certain date/time (RTC)?


No, but perhaps I'll include it

  Quote  I also had a problem with the editor:


What terminal are you using?

Can't remember if I've posted a version with the new console code. Try this version

2018-11-16_032337_ArmmiteL4.zip Edited by matherp 2018-11-17
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 09:14pm 15 Nov 2018
Copy link to clipboard 
Print this post

New functionality:





2018-11-16_070411_ArmmiteL4.zip

Also:

Option LCDpanel SSD1306I2C, orientation [,x_offset] 'set x_offset to 2 for 1.3" displays

Option LCDpanel SSD1306SPI, orientation, CDpin, RSTpin, CEpin [,x_offset] 'set x_offset to 2 for 1.3"

Option LCDpanel N5110, orientation, CDpin, RSTpin, CEpin [,contrast] 'Try contrast values between &HA8 and &HD0 to suit your display, default if omitted &HB1

Option LCDpanel ST7920, orientation, CEpin, RSTpin

Option LCDpanel GDEH029A1, orientation, CDpin, RSTpin, CEpin, BUSYpin [,fullrefreshinterval] '2.9" E-INK display, fullrefreshinterval defaults to 1, specifies how many fast updates take place before a "screen flash" full update. Too high a number risks permanently polarising the display

SETPIN n,DAC ' works for pin 10 and pin 11

PIN(n) = voltage ' sets a DAC pin to the specified voltageEdited by matherp 2018-11-17
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 971
Posted: 11:57pm 15 Nov 2018
Copy link to clipboard 
Print this post

Hi Peter,
I think there is some sort of thing/artifact in the OPTION LIST in the latest version.
See below the first OPTION LIST entered after a flash.
Putting a valid entry in seems to make it go away.
Remove the valid entry and it comes back.


> option list
OPTION LCDPANEL , GDEH029A1

> option lcdpanel USER,128,64
> option list
OPTION LCDPANEL USER 128, 64

> option lcdpanel disable
> option list
OPTION LCDPANEL , GDEH029A1

> ? epoch(now)
946686075



Regards
Gerry
Latest F4 Latest H7 FotS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3311
Posted: 02:07am 16 Nov 2018
Copy link to clipboard 
Print this post

In trying to flash the Armmite L4 with the ST-Link utility, I get the message, "The elf loader file is not accessible." I can see the ArmmiteL4.elf file, but I haven't been able to figure out what to do with it.

Clicking "External Loader" and "Add External Loader" doesn't appear to give me any way provide the location of the file.

What do I need to do to proceed? (Win7)

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 02:45am 16 Nov 2018
Copy link to clipboard 
Print this post

You should be using the HEX file, not the ELF for ST-Link utility.

This is the procedure I use for the H7 and the L4:
  Quote  
I just tried setting up my laptop with ST-LINK and a new, straight from the box NUCLEO board.
There was no previous ST software or drivers on the laptop so virgin territory.

It was easy.

Download STM32 ST-LINK Utility (en.stsw-link004.zip)
Extract the setup file and run it.
It will install the required drivers during the setup.
Start ST-link
Plug in the Nucleo board.
It works out-of-the-box without touching any jumpers.
Ignore the Windows ‘What will I do now?’ message.
Click on ‘Target/Connect’
It is advisable to do a full erase
Target/Erase Chip
Go to ‘File/Open file’ and open the armite.hex firmware file.

Go to ‘Target/Program and Verify’
When that's done.
‘Target/disconnect’
Close the program and open up your preferred terminal program.

You might get some initial garbage in the serial stream.
It’s really that simple.

IF you have more than one device connected, you can chose which one in the settings menu. It would be a good idea to stick with one at a time. The serial numbers aren't written on the devices anywhere.

External power will be required once you start adding displays etc.

Jim
VK7JH
MMedit
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3311
Posted: 03:11am 16 Nov 2018
Copy link to clipboard 
Print this post

Thanks for that. Similar to what I was doing.

However, when I do Target/Erase chip, I get "The elf loader file is not accessible".

If I omit the Target/Erase step and go to File/Open (and open ArmmiteL4.hex) and Target/Program and Verify, I get the same message.
Edited by lizby 2018-11-17
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 971
Posted: 05:48am 16 Nov 2018
Copy link to clipboard 
Print this post

Hi Peter,
Any chance of adding 0.91" SSD3306 128*32

I have written it as a basic driver based on your previous example.

The changes are.
OPTION LCDPANEL USER,128,32 'MM.VRES reads as 32

During initialization two changes:
OLED.SCmd(&HA8)'MULTIPLEX
'OLED.SCmd(&H3F)' 3F required for 128x64 display
OLED.SCmd(&H1F)' 1F required for 128x32 display

OLED.SCmd(&HDA)'COMPINS
'OLED.SCmd(&H12)'12 for 128*64
OLED.SCmd(&H02)'02 for 128*32

The buffer required is only half the size so
for i% = 0 to 3 'was 0 to 7
s$(i%)=string$(128,chr$(0))
next i%

Possible tweak to your current syntax so it could be in ARMmiteL4:
Option LCDpanel SSD1306I2C, orientation [,type] 'set type=0(default) for 0.96";1 for 0.91"; 2 for 1.3" displays

Regards
Gerry

Edited by disco4now 2018-11-17
Latest F4 Latest H7 FotS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 08:21am 16 Nov 2018
Copy link to clipboard 
Print this post

There is actually a much easier way to program the L4 and the H7 than using ST-LINK as they are both MBED enabled. I hadn't tried it before because it doesn't make sense when developing but for distribution it is excellent.

The attached ZIP contains a ".bin" file as well as the .elf and .hex

If you open the file manager on your PC with the Nucleo plugged in you will see a disk named "NODE_L432KC" or something similar. Just copy the .bin file to that disk and magically the STM32 is updated

This also fixes the OPTION LIST error

2018-11-16_182055_ArmmiteL4.zip

  Quote  Any chance of adding 0.91" SSD3306 128*32


Will doEdited by matherp 2018-11-17
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 936
Posted: 10:59am 16 Nov 2018
Copy link to clipboard 
Print this post

Hi Peter,

thank you so much for your "cpu sleep epoch"!
It works very fine! Have you measured the power consumption during that time?

(I am using Tera Term as terminal program.)

Do you think there is a way to write a Basic driver for an Adafruit LS013B4DN04 display?

...then I'd be a lot closer to my Micromite wristwatch!

Updating with the ".bin" didn't work for me - I had to flash the controller again...

FrankEdited by Frank N. Furter 2018-11-17
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 11:14am 16 Nov 2018
Copy link to clipboard 
Print this post

  matherp said  
If you open the file manager on your PC with the Nucleo plugged in you will see a disk named "NODE_L432KC" or something similar. Just copy the .bin file to that disk and magically the STM32 is updated




is-it a "private-joke"?
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 11:16am 16 Nov 2018
Copy link to clipboard 
Print this post

Hi Frank,

Just out of interest, it says that the display is no longer produced; however there is a replacement which is slightly bigger - both physically, and in pixel resolution.

Highlighting this in case any driver Peter creates immediately becomes redundant due to lack of product availability.

The link for newer display is here
 
     Page 2 of 8    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025