The PIC18F2525 drives the GLCD module. The code for the 18F2525 was probably written in C, compiled, and programmed into the PIC using a special programmer like a PICKIT/PICKIT2 or some other variation. The 18F2525 * MUST * be programmed to act as a driver between the PICAXE and the GLCD module. It must also be programmed to accept the button presses and to provide the menu system for the display. This includes the clock setting menu & related code.I never got the code 18F2525 code from VK4DD. I was able to write some simple code and got the clock to display the time. I stil haven't figured out how to adjust the time.
The assistance I need now is to display the serial output of the picaxe on the GLCD via the 18F2525.
That is not going to be easy to give unless we can be told what the GLCD controlling 18F2525 is expecting to receive to do what you want it to do.The assistance I need now is to display the serial output of the picaxe on the GLCD via the 18F2525.
Device = 18F2525
Clock = 40 ' external crystal x 4
#Option GLCD_SCREEN_WIDTH = 196
#Option GLCD_SCREEN_HEIGHT = 64
#Option GLCD_DATA = PORTB
#Option GLCD_RS = PORTA.3
#Option GLCD_CS1 = PORTA.4
#Option GLCD_CS2 = PORTA.5
#Option GLCD_RW = PORTA.2
#Option GLCD_EN = PORTA.1
#Option GLCD_RST = PORTA.0
#Option GLCD_MODEL = KS0108
Include "GLCD.bas"
Include "FixedFont.bas"
Include "Arial.bas"
Include "Garamond.bas"
Include "Tahoma.bas"
Include "Verdana.bas"
Include "Times.bas"
Include "DS1307.bas"
Include "convert.bas"
Include "utils.bas"
Include "graphics.bas"
Include "ks0108.bas"
ADCON1 = $07 // PORTE as digital (GLCD)
SetAllDigital()
GLCD.Cls
GLCD.SetFont(Fixed)
GLCD.WriteAt(4,2,"RESET")
// local variables...
#option DS1307_SI2C = true
#option I2C_SDA = PORTC.4
#option I2C_SCL = PORTC.3
// if the DS1307 device has not been enabled, we need to give
// it some default values - here we set for 2 o'clock
// on the 19th April 2007...
If Not Enabled Then
Time.Hour = 14
Time.Minute = 32
Time.Second = 27
Date.Day = 19
Date.Month = 04
Date.Year = 14
DS1307.Write(Time,Date)
EndIf
While true
DS1307.Read(Time,Date)
GLCD.SetFont(Fixed)
GLCD.WriteAt(10,0,DecToStr(Time.Hour,2),":",DecToStr(Time.Minute,2),":",DecToStr(Time.Second,2))
GLCD.WriteAt(10,40,DecToStr(Date.Day,2),"/",DecToStr(Date.Month,2),"/",DecToStr(Date.Year,2))
Wend
That's what I suggested, here :Another option is to replace the 18F2525 with a Picaxe 28X2 ...
I suspect you believe that the serial data going into the 18F2525, is following some form of standard protocal but thats not the case unfortunately.I'm unable to ask any questions until I'm "validated" on the swordfish forum.
What do the numbers mean (23, 24...etc) below?
hserout 0,(23,"PT")
hserout 0,(24,"T ")
hserout 0,(25," E")
Yep, a PICAXE forum is not the best place to get support for a competing product such as Swordfish basic.Dispose of the PIC, replace with PICAXE 28X2, then WE can help !.