![]() |
Forum Index : Microcontroller and PC projects : Armmite L4 battery miser, first beta
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10222 |
This is the way they work I'm afraid. The response to partial updates seems to be screen specific. Remember these display were designed for applications like supermarket shelves where they updated very infrequently. For an application like a temperature display where the updates are, say, every 5 minutes the flashing display shouldn't be an issue. They certainly aren't suitable for anything remotely real-time |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 982 |
Thanks for the info Peter, I was under the misconception that I should have been able to get the display to update a clock as per your Youtube video. I will see if I can test the SetTick issue previously described. Ran TassyJims code for SetTick and it seems to work ok. ![]() Regards OA47 |
||||
sagt3k![]() Guru ![]() Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp Thanks for your job... very beautiful STM32L4. Can I have the list of all cpu freq for STM32L4/H7. , I'm modifying Micromite console to set by software all possible frequencies. Thanks Antonio |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10222 |
H7 fixed 400MHz L4 2,4,8,16,24,32,48,80 |
||||
sagt3k![]() Guru ![]() Joined: 01/02/2015 Location: ItalyPosts: 313 |
Thanks matherp |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6269 |
Strange things happening with PAUSE I decided to experiment with setting the RTC drift. This prints the time once a minute and I have MMedit set to time stamp each line. Everything looks goods but then I decided to PAUSE the printouts until the seconds were zero. Uncomment 'pause stalltime to delay the SETTICK by the appropriate time. Instead of printing the time every 60 seconds, it does it 12 seconds sooner. Using PAUSE has upset the timing. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10222 |
Jim I can't reproduce using the latest version posted 7.06 24th November. Please can you check this version with and without the LCDPANEL enabled |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6269 |
The PAUSE problem seems to be specific to one chip. That's two units that have ended up with strange problems in spite of full erase before loading firmware. I will do some more testing. Jim VK7JH MMedit |
||||
sagt3k![]() Guru ![]() Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp On Armite-32p sometimes it happens that when I give "run" it displays this message: Restart to activate … even if I proceed to restart the message appears the same This is the code: What does it mean? Thanks Antonio |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10222 |
You can't change baudrate in a program so if the baudrate isn't already 115200 you will get the message as it assumes you need to reset the terminal to the new baudrate and then restart the uP. I'll put a block on the command being used in a program in the next release. |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
My L4 has been working great with an E-Ink display and HC-12 connected. I just connected a Humidity Sensor that works OK on an E-28. It is an I2C device, connected to D4-SDA and D5-SCL with 4.7K pullups but it wont work. Has any one used the I2C bus with no problems. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1000 |
I used an I2C display on those pins with no issue. i2c open 400,1000 Latest F4 Latest H7 FotS |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
OK I was using I2C open 100,500 I tried 400,1000 but still no go. I will try re flashing the chip. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
OK I reflashed the chip with the last release and still not working correctly, the values I was getting were -40 c and -1% humidity and now I get 101c and 99%. edit..Flashed again with the earliest Ver. with E-Ink and I am back to Getting -40c and -1% I can't help thinking it has something to do with the Firmware. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6269 |
Can you post the code you are using. I have a SHT21 here that is much the same as the HTU21. I might have time to play tomorrow. Jim VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
Thanks Jim but it's New Years Eve and I have to party tonight. Will post my code tomorrow. Edit. Aw what the heck just have one less beer. Here's the code.. DIM as integer TDATA(2) '2 bytes of temp data DIM as integer HDATA(2) '2 bytes of humidity data I2c open 400,1000 'Get Temp and Hum. from HTU21D HTU21D I2C close Temperature = Cint(Temperature) RelHumid = Cint(RelHumid) InTemp$ = Str$(Temperature,2) InHum$ = Str$(RELHUMID,2) Print InTemp;" c" print InHum;"%" Sub HTU21D 'TEMPERATURE SENSOR, This is the SUB routine for talking to the HTU21 I2c write &H40,0,1,&HF3 'HTU21 addr= 40 hex, request temp = F3 hex pause 100 I2c read &H40,0,2,TDATA() 'reads temperature TEMP1=TDATA(0)*256 + TDATA(1) 'combines both data bytes I2c write &H40,0,1,&HF5 'request humidity Temperature=(175.72*(TEMP1/65536))+ -46.85 'HTU21 formula for temp TEMPCOMP= -.15*(25-Temperature) 'for RH temp comp pause 50 I2c read &H40,0,2,HDATA() HUMIDACT=HDATA(0)*256 + HDATA(1) RELHUMID= ((HUMIDACT/65536)*125)+ -6 ' measured humidity RFHUMID= RELHUMID + TEMPCOMP 'Temperature compensated humidity end sub "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6269 |
Happy new year! I changed your program slightly but didn't touch the HTU21D SUB at all. I had to add the missing $ from InTemp and InHum variables in the PRINT statements. Even with a newly flashed chip I received an error with the I2C When initializing it complains that I2C is already open and when closing: [13] I2C close Error: I2C in use for display > There is no display configured. gives: > RUN 07:55:04 20 c 49% 07:55:14 20 c 49% The humidity is a few percent lower than a DHT22 running nearby. This is with a HTU21 chip. So it does work but I am seeing a strange problem with I2C and non-existent displays. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10222 |
Does this solve it? 2019-01-01_090022_ArmmiteL4.zip |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6269 |
Define 'solve' I no longer get the error with I2C CLOSE but I still need the ON ERROR SKIP before opening. I2C CLOSE doesn't seem to do anything. > RUN [5] I2C open 400,1000 Error: I2C already OPEN > i2c close > RUN [5] I2C open 400,1000 Error: I2C already OPEN > In fact, I can remove all references to I2C OPEN from the program. Time for you to put the party hat on. 10 minutes to go. Jim VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
@Jim, Thanks for testing, I was also getting the I2C error. I just connected an RTC to see if that worked, but get an error with RTC SETTIME I think I might be ditching the L4 soon and using an E-28. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |