thankyou Jack , a question that i have always asked: when is an output pin not a suitable serial pin, and when is an output pin a suitable serial pin, i have already asked for a chart of all possible usable picaxe devices and their definitive pins suitable for serial comms to an oled..I shall rewrtie your program into the external 18m2, and also try b5 pin instead of b7 pin, the b5 being hserout, also what does the h stand for in the labelled hserout ?Peter, your code in post #35 has a wrong number in the line after Main:
It should say serout Display,n2400,(254,1) but you put 245,1
next b0 is also missing from the line after pause 500
Edit: Make sure you also follow the advice from lbenson in post #40
One 18m2 should be fine to drive several oled displays provided you have enough serial output pins. You might notice a slight lag with the display updating if you change several displays at the same time.
Same reason given in post 39 above:Sadly this programmed hiccupped again at line 12, dont know why.. Regards Peter
The line, "Count from 1 to 10" is a comment. You left off the semicolon at the beginning, which is an alternative to the single quote for indicating that a comment follows.
COUNT is a valid command. As to exactly where the "^" is placed, it depends on where the syntax checker is when it determines that the syntax is not correct.Ok I shall keep with tradition and ask yet another dumb question, why does the up puncuation arrow appear between the 1 and the word TO ?? IN MY PHOTO?
; Count from 1 to 10 and display number on bottom line. for b0=1 to 10
SYMBOL Display = B.7 ; Pin on external PICAXE used to send data to axe133y init: pause 1000 ; wait for display to initialise, found 500 wasn't long enough main: serout Display,n2400,(254,1) ; clear display pause 30 ; now wait 30mS for display to fully clear serout Display,n2400,(254,128) ; Move to line 1, position 1 serout Display,N2400,("Start Counting") ; output text ; Count from 1 to 10 and display number on bottom line. for b0=1 to 10 serout Display,n2400,(254,192) ; Move to line 2, position 1 serout Display,N2400,(#b0) ; output b0 as text pause 500 ; short wait before moving on to next number next b0 ; Overwrite top line with new message (long enough to overwrite original) serout Display,n2400,(254,128) ; Move to line 1, position 1 serout Display,N2400,("Finished ") ; output text
SYMBOL Display = B.7 ; Pin on external PICAXE used to send data to axe133y W2 = 48611 ' 5000th prime (better prime number sequence) do RANDOM w2 b6=w2 // 6 + 1 ' random number between 1 and 6 SELECT b6 CASE 1: serout Display,N2400,("Start Counting") ; output text CASE 2: serout Display,N2400,("Display line 2") ; output text CASE 3: serout Display,N2400,("Display line 4") ; output text CASE 4: serout Display,N2400,("Display another line 2") ; output text CASE 5: serout Display,N2400,("Display yet another") ; output text CASE 6: serout Display,N2400,("Display line 6") ; output text ENDSELECT pause 2000 loop
Yes, the AXE133Y/134Y is capable of receiving and displaying data from another PICAXE that is also interworking with an RTC (clock) chip. Success all depends on your skill level and determination to succeed.Thankyou Everyone on the forum, I have been able to program the oled with at least simple text strings, I am now trying my hand at making text strings blink on and off, to be a bit more attention getting with certain alarm inputs .. Also is it possible to interface an axe133y or axe134y oled display with an 18m2 or other picaxe device with a real time clock rtc such as the dallas 1307 or similar, such that on one line of the oled shows the current passing time, and on the next line, the display shows when an event occurs, ie it freezes the event time on the display.??. I have also played with gosubs with some success showing different text strings for different events, as soon as I can I will share my coding as to how I programmed the gosubs.. Regards Peter
#picaxe 08m2 do for w1 = 0 to 1023 ; Add e.g. STEP 25 for larger steps (~100mV) PWMOUT c.2 , 255 , w1 Pause 100 ; For 10 steps / second next loop #rem _______ |o U | +Supply==|+Vdd 0v|------------@---------GND | | | SI>|C.5 C.0|---> _|_ | | ___ 1 uF --->|C.4 C.1|---> | + | | 10k | --->|C.3 C.2|----/\/\----@--------> DAC Signal |_______| 08M2