|
Forum Index : Microcontroller and PC projects : Small graphic steps
| Author | Message | ||||
| VK2AHB Regular Member Joined: 28/07/2022 Location: AustraliaPosts: 51 |
I've worked out a bit about display and number boxes and how to put values in them. Still learning. This is with the DS18B20 and RTC connected. Also have a DHT11 but it's not playing this time. Occasionally, seemingly randomly, the screen goes white and I have to rest the 'mite. Maybe I bumped the wires. Paul VK2AHB ![]() |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
The screen going white (or rather grey) is the sign of a reset of the LCD or the processor. You are using the PCB for the VGA version of the PicoMite firmware which does not support LCD displays. I'm not sure what pin conflicts you would have using the PicoMite version (which does support LCD panels) on the VGA board but that may be the cause. What version of the firmware are you using? The PicoMite or PicoMiteVGA version? Geoff Geoff Graham - http://geoffg.net |
||||
| VK2AHB Regular Member Joined: 28/07/2022 Location: AustraliaPosts: 51 |
I'm using the PicoMite firmware. It works well, then randomly resets. Hitting the reset button on the board doesn't always bring the black screen back. It takes a few goes sometime. Paul |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2832 |
Re the DHT11, to get the correct T & H only read it once every 2 seconds. Do : Bitbang humid gp0, T, H, 1 : pause 2000 : ? T, H : loop 'DHT11, whole Deg. only To get the tenths of degrees try this 'Reading DHT11 sensor using DHT22 BITBANG HUMID function. 'Requires 2 pins. eg link pins GP0 & GP1 to DHT11 signal pin. ' It gives 10ths of degrees. The normal DHT11 option does not. Do pin(GP1)=1 setpin GP1,dout,oc pause 2000 pulse 20 pause 19 BitBang Humid GP0,T11,RH11 if RH11=1000 and T11=1000 then RH=1000 : T=1000 else T = fix(T11/25.6) + ((T11*10) MOD 256)/10 RH = fix(RH11/25.6) Endif setpin GP1,off print "Temp ";T,"Humidity ";RH loop More info. https://www.thebackshed.com/forum/ViewTopic.php?TID=13832&P=3#174519 Also RTC GetReg 17,Temp : ? Temp 'get temp. from DS3231 RTC |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8304 |
@VK2AHB Interesting, Paul. That PCB wasn't designed to be able to use LCD displays. :) How have you got it connected? Which signals on which GP pins? GP18, GP19, GP20 and GP21 should be avoided as they have resistors and diodes to GND, loading the outputs. Also, I'd highly recommend that you use female/female Dupont leads to connect the display and do without that little breadboard. They can give wonky connections, especially with the weight of a display levering on the el-cheapo Chinese tinplate sockets. Edited 2022-09-08 20:09 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2832 |
Typo in code above, fixed here. 'Reading DHT11 sensor using DHT22 BITBANG HUMID function. 'Requires 2 pins. eg link pins GP0 & GP1 to DHT11 signal pin. ' It gives 10ths of degrees. The normal DHT11 option does not. Do pin(GP1)=1 setpin GP1, dout, oc pulse GP1, 20 pause 19 BitBang Humid GP0,T11,RH11 if RH11=1000 and T11=1000 then RH=1000 : T=1000 else T = fix(T11/25.6) + ((T11*10) MOD 256)/10 RH = fix(RH11/25.6) Endif setpin GP1,off RTC GetReg 17,TempRTC print "Temp ";T,"Humidity ";RH,"TempRTC";TempRTC,time$ pause 2000 loop PS Ensure there is a pullup on the data pin. Probably one on the module but best to be sure. Edited 2022-09-08 22:31 by phil99 |
||||
| VK2AHB Regular Member Joined: 28/07/2022 Location: AustraliaPosts: 51 |
Well you know what they say: 'Fools rush in ...' I'm using pins 21, 22, 24 for the display and 25 the DHT11. I'm pretty sure the DHT11 was working in VGA mode, not sure what pin I used then. Paul |
||||
| stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2681 |
It is true breadboard birds nest wiring is prone to faults. Wire it with female connectors as suggested previous post is more reliable. |
||||
| stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2681 |
I still use bread boards because just testing but got to solder a reliable board. Do not say pcb... strip board and hope no capacitance problems because of parallel tracks. If you look at this the wrong way it will crash. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |