Something I ran into also. Has something to do with reading state of pin for toggle, a problem if pin is set to analog, I think. Anyway, a simple reliable method to toggle a pin is to add 1 to the...
Type: Posts; User: SUNFLOWER; Keyword(s):
Something I ran into also. Has something to do with reading state of pin for toggle, a problem if pin is set to analog, I think. Anyway, a simple reliable method to toggle a pin is to add 1 to the...
And if you want to add to time values from DS1307 then convert to decimal before addition --
sec = (RTCsec >> 4)*10 + (RTCsec & $F)
I made a typo error above
should be --
second = (sec >> 4)*16 + (sec & $F)
second is variable value which displays sec digits when second is displayed as hex number.
second = (sec >> 1)*16 + (sec & $F) to convert time number sec to hex value second that displays time...
rtchour = sethour
If sethour is 12 noon then rtchour must be a hex value that creates the digits 12
Perhaps this will help. Note input time number in hex --
hserin [hex2 wb1]
Clock_set:
GOSUB GET_TIME
hserout [ "0 second ",hex sec,13,10]
I use DS1307 a lot and it must be super reliable for years, otherwise concentrator sunlight could start fires or melt rocks. I have not read your code but have experience strange RTC behavior and...
I had that problem caused by the configs of tiny bootloader, redirects HPWM2 to another pin on 18F4620...
' __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H ; & _CCP2MX_PORTBE_3H ;...
I have used many 18F4620 for huge programs. Love the chip.
if azMotor then
azMotor_A = m1_ina '14 PORTD.6 ' Digital I/O PORT D.0 - D.7 NUMBERED 8 - 15
azMotor_B = m1_inb '13 PORTD.5
else
azMotor_A = m1_inb ' Software...
It is possible to use variables to name ports then change variable values to change ports. copied from my program --
http://www.harbornet.com/sunflower/PCB.pbp
' The PORTL and PORTH...
Very interesting. I did not know about DS1370 battery voltage sensitivity. I used long-life CR 1620 for 10 year clock service and never checked battery voltages with a meter. Something to...
A schematic showing DS1307, never had trouble except once when a circuit mistake overheated the voltage supply and the clock with battery gave similar data.
...
According to data sheet 18F4620 making one port analog makes all smaller number ports analog which interferes with TOGGLE. IF AN5 is analog then AN0 thru AN4 are also analog, like a pyramid. TOGGLE...
If you can live with 2 second resolution then there are 43200 2-seconds per day -- one word.
Many HBridge drivers have motor current sensing (0-5 V) pin outputs --
' Dual VNH5019 Motor Driver HBridge http://www.pololu.com/docs/0J49/all
' Dual MC33926 Motor Driver HBridge ...
if dutycycle left > 32777 then
dutycycleleft = 0
elseif dutycycle left > 255 then dutycycleleft = 255
endif
Or whatever -- HPWM value must be 0 to 255.
if dutycycle left > 255 then
dutycycleleft = 0
endif
Or whatever -- HPWM value must be 0 to 255.
' Printed circuit version --
' http://www.harbornet.com/sunflower/PCB.jpg
' http://www.harbornet.com/sunflower/PCB.pbp
I wrote a program for 18F4620 that reads time and date from DS1370 and then calculates sun position for users latitude, see Get_Path:
Code = http://www.harbornet.com/sunflower/PCB.pbp ...
I saw the same time numbers awhile ago. The problem came from an accelerometer connected reversed power and ground causing voltage regulator stress. Problem cleared without damage after sensor was...
OK. That makes sense. So, excepting new features, both will produce the same hex file from the same source code?
I have posted solar tracking code as open source to be compiled with PBP version 2.60A.
My question (from others), Are the latest versions of PBP 100% downward compatible with version 2.60A?
...
Thanks Dick, I am now using this info to control a field of solar micros to stow with central power control -- RCON.1
This has been the most helpful forum I have ever visited, sometimes absolutely buried in good solutions. We have made tremendous progress with open source pic basic programs. Our published listings...