Good bye and thanks for the fish

stan74

Senior Member
since september 2016 when I 1st got a picaxe it has been interesting and above all fun. my objective was an object avoiding robot v1,2,3,4 you know.then by erco aka eric a line follower but the vibes on the forum and trying new stuff that needs speed I'm gone. Have fun you guys with what is an interesting hobby. If you did it for a living your opinion might be different..like gardening.
 

westaust55

Moderator
Stan,
Certainly use other microcontrollers where speed makes that essential.
But you should not make a blanket decision to avoid PICAXE.

It can be true about profession versus hobby.
There is the old line that for trade/profession "x" that the tradesperson does good work for the customers but at his/her own home the same discipline installation/feature is in poor condition and in need of work.
 
Last edited:

fernando_g

Senior Member
Don't understand the sentence: "the vibes in this forum".

I have been around since 2008, and this is one of the most civil and helpful web forums.

Also, I echo westy's advice. Never say never to a technology. It is true that the Picaxe is not the most capable processor, but this limitation makes it real fun to use.
 

rq3

Senior Member
since september 2016 when I 1st got a picaxe it has been interesting and above all fun. my objective was an object avoiding robot v1,2,3,4 you know.then by erco aka eric a line follower but the vibes on the forum and trying new stuff that needs speed I'm gone. Have fun you guys with what is an interesting hobby. If you did it for a living your opinion might be different..like gardening.
Stan, in my youth, I also went spearfishing, and more than once shot myself in the foot. Personally, I've enjoyed your input, and hope to see you back in the future!
 

mikeyBoo

Senior Member
Yep, the Picaxe is not practical for every project. Maybe because I’m retired and lived with technology all my working life, I tend to be pragmatic. My opinion (you know what they say about opinions) is that the best solution is the one that goes the quickest from idea to reality.

The thing I like about the Picaxe is it’s simplicity. There is no operating system to deal with and circuit board design is a breeze. For small control or PLC-type projects it’s usually (at least for me) the quickest route from point A to point B.
Now, if you need wifi, lots of math, lots of memory, a small Linux (e.g. Pi) controller may be better, but the development time will be longer. The Linux command line stuff is kinda’ stinky (looks very much like the Unix stuff from decades ago), so get out your wizard’s cape & secret decoder ring.

If you need to work with uSec timings, the Linux stuff may disappoint you (remember there’s an operating system & usually a high-level language to travel through). The only practical way to walk around in the uSec world is with assembly language. When I need to do this, I generally fall back on 805x devices (simple & fast).
Keep in mind your Linux controller can talk to Picaxes or other small uProcs so you can offload stuff that needs to be deterministic.

Don’t know about other folks, but for me, ~90% of my projects can be done with Picaxe, 5% Linux boards, 5% 805x.

The vibe thing. There’s always gonna’ be a few guys who need to invalidate others to enhance their own self-esteem. Haven’t seen much of that on this site. Unfortunately, this is becoming a big problem in the USA, where some folks will scream in your face if you don’t have the “correct” opinion. Most techies are decent people, so hopefully that won’t come to this site.

Sorry to see you go. I predict you’ll be back.
 

julianE

Senior Member
Stan74,

Hate to see you go. Thanks for all the help, I very much appreciated it. Maybe I'll read your posts on other forums provided you keep the same name.
This is the only forum I participate in. The 'bad vibe' people seldom stay for long, the ones that persist eventually turn harmless cause of preponderance of extremely decent people.

Unfortunately, this is becoming a big problem in the USA, where some folks will scream in your face if you don’t have the “correct” opinion.
Bless your heart mikeyBoo, that can't be happening in genteel South Carolina.
 

MFB

Senior Member
A frequent bit of advice on this excellent forum is that no one microcontroller is optimum for all embedded applications.

After all, if you only carry a hammer in your tool box you approach every problem as if it’s a nail.

As an example, I recently used an 08M2 to reverse an RC servo in small model aircraft, but would not have considered using a Raspberry Pi.
 

erco

Senior Member
Stan: Say it ain't so! Please don't go, you're the Best New Builder here! Whoever offended you here, we'll ban them for life! Seriously, you can't go, you're the liveliest guy here and I really enjoy your comments and projects. Please reconsider, Boss!
 

hal8000

Member
I wouldn't necessarily leave the Picaxe forum Stan74.
Your reply helped me on another thread, and although I've been a member a long time, I don't have much spare time.
This forum seems to have a lot of decorum. There are faster PIC's and languages, but remember that hardware
(relays, switches, motors) is 1000x slower so speed isn't everything.
 

stan74

Senior Member
It was great fun. I was grateful for the help and when I knew enough to help,did. With cheap fleabay stuff I was experimenting more and a few ideas need speed and programming chips in a familiar way so once started using a new system for that and all the re-learning why not stick with it for the slow stuff to.
It's understandable but frustrating that post are deleted,I'm surprised I wasn't banned.
I've seen posts by others on the forum on other forums,maybe we'll meet.
atm I'm beta testing a 50khz timer 1 interrupt for uno,well all timer interrupts. I found my 20meg usb dso don't do quick on off port,but would with picaxe.
PS it's just a hobby for me,I'm retired and never earned money from pics...z80,yes
 

stan74

Senior Member
This sort off stuff and for a programmer,the guy's got a sense of humour.
Code:
;50 KHz timer Interrupt--the interrupt handler is called 50,000 times a second
;so keep the code in the interrupt short or another interrupt will happen and mess up
;in fact it's uselees other than an example 
 #chip mega328p,16
 #option explicit
'
  dir portb.0 out
'
;evan's not helpful info
    ' Add the handler for the interrupt
    On Interrupt Timer1Match1 Call PWMHandler
    ' Initialise the timer - this is required
    ' Set prescaler and then start the timer
    InitTimer1 Osc, PS_1_1
    ' Start the timer - this is required
    StartTimer 1
    ' Set the OCRnA register to give us the corrent timed Interrupt.
    ' This means there are 255-OCRnA+1 clocks cycles to the next event. Why 1? Becuase the TOP value is 0 not 255.
    OCR1AH = 0 'this OCR1A Register is used to manipulate the counter resolution.
    OCR1AL = 159 'this OCR1A Register is used to manipulate the counter resolution.
    TCCR1A = 0x80;
    TCCR1B = 0x09   'Set the compare module, set bit 3 and bit 1
'
'Main routine
  Do
;Your code that will run slow goes here
;but it won't get a look in
  Loop
  end
'PWM sub
'This will be called when the Timer matchs
Sub PWMHandler
;The program likes it here 
portb.0= not portb.0 ;make square wave to test frequency
End Sub
 

rq3

Senior Member
It was great fun. I was grateful for the help and when I knew enough to help,did. With cheap fleabay stuff I was experimenting more and a few ideas need speed and programming chips in a familiar way so once started using a new system for that and all the re-learning why not stick with it for the slow stuff to.
It's understandable but frustrating that post are deleted,I'm surprised I wasn't banned.
I've seen posts by others on the forum on other forums,maybe we'll meet.
atm I'm beta testing a 50khz timer 1 interrupt for uno,well all timer interrupts. I found my 20meg usb dso don't do quick on off port,but would with picaxe.
PS it's just a hobby for me,I'm retired and never earned money from pics...z80,yes
Well, goodness, that was fast. "The graveyards are filled with indispensable men".
This is a technical forum. If you have valuable technical input, or questions, please contribute or ask. If you don't, then don't. You can come and go as you please, the histrionics aren't really needed.

Welcome back. Just my $0.02 worth, bridge burning reduces your travel direction by 100%, if you do it often enough.
 

alhoop

Member
Stan:
I feel your pain. I'm trying to convert a Picaxe 14M2 program to run on an Arduino - all I need is millisecond timing(IE 218/milliseconds).
I'm 79 - the learning curve is very,very steep and if you got a bad vibe or two from here wait until you meet the characters on the Arduino/C forums.
I got a lot of help here from Technical/Hippy/Westy and others. Not so much there.
Check back here to update your progress.
Al
 

Janne

Senior Member
I felt much like stan74 when I first discovered that there are other (gasp) micros besides picaxe. But in the end, picaxe's just another tool in the box. I would not consider it for any commercial projects, and it seems theres is usually a better option for hobby projects.. But for simple stuff it's still very viable. Last summer my buddy needed a programmable timer / counter to his solar tracker. 10 minutes of picaxe code writing, 10 minutes testing on a AXE090 breadboard and he was off with a programmed micro for his project :)
 

steliosm

Senior Member
Not every chip fits every project, which is well understood and received. Sometimes you need speed, some times you need faster development time and some times you need cheaper chips :) Mind you, that the picaxe is targeted for education and not for general hobby/project/product related tasks. Unless you wanna do fancy RGB led stripe effects or read/write to high speed sensors, picaxe is able to do most of the things you will need. I have had picaxe chips connecting to lan/internet years ago talking to jabber or web servers pushing or retrieving data. I would certainly consider PicAxe for commercial projects. You can find arduino in commercial projects or products from startup companies now days, why not a picaxe?
 

erco

Senior Member
Stan: It's very easy to offend someone online, intentionally or not. Similarly, email can be a troublesome medium, when you can't see the recipient and "course-correct" what you say. Sometimes tech whizzes lack empathy, so if you feel wronged by someone here, it's natural to pull back. But in time I hope you decide to come back. Lurking is OK too. There's a great deal of knowledge and talent in the forum on nearly aspect except social graces. As others have pointed out, there are plenty of forums for other micros, some better behaved and some not. Personally I really enjoy this forum, and I've followed your progress with great interest. I'd hate to think we lost you to another chip forever. Please look in on us from time to time and jump back in when appropriate.
 

69-cat

Member
I have to say the times I have posted questions, I get a better understanding of how the Picaxe works. I have made some stupid mistakes and posted the HELP questions just to find out it was something I did but this is how you learn. I tend to take "clips" of programs that are posted and try to make them work for me before I reach out for help and 90 percent of the time it is just the lack of knowledge. Yes, there are a lot of very savvy people on the is forum and always wiling to help! I was always told...the only stupid question is the one you don't ask!
Dave
 

stan74

Senior Member
I was glad to discover Picaxe last September. I said at the time how fast I learnt enough to make a "robot". I got the welcome to the forum but someone said it's not fast. I found it was fast enough for me until I used a GLCD and wrote my own plot and line and print at coordinates "lib".Lots of work,no one on the forum had done it. I then realise that picaxe wasn't up to repeated calculations and just sending a 1K screen buffer took a second.You could see the screen being erased. I can do it 100 times faster so now it's viable. You can see the speed in the videos I posted that were tried 1st on picaxe.
How many picaxe users do all that stuff? I wonder how the CRT guys are getting on,analogue clock and battle zone.
I'll sort you alhoop but I don't do c. every 218 ms? try https://libstock.mikroe.com/projects/view/398/timer-calculator for values.
I can't say post the m2 code here and I'll convert it to asm.
 

erco

Senior Member
Horses for courses. Graphics isn't the Picaxe's strong suit, can't argue there. It does lots of other stuff fine though. Robots, servos, sensors, etc.
 

steliosm

Senior Member
Some times it's better to go to the 'big boys' such as RPi, Beaglebone, etc. to do advanced stuff. If graphics is your thing and you are not just doing it for fun, e.g. to see how much you can push the little picaxe, you better move on to a bigger platform. Picaxe is not meant to do graphics so it doesn't make sense to compare it on that field.
 

stan74

Senior Member
That is excellent but you can see what's happening. Try read_adc and display a sine wave from touching the adc pin and show mains hum. You've seen what a glcd can do..it's just scaled down for large led display or the same for 128x64 real leds. Picaxe can't multiplex leds from an interrupt and do pixel position calculations fast enough for real time. There's chips for led matrix I know.
Kick is OLDmarty, could you move pacman round the display with a joystick 10 frames a second?
 

pxgator

Senior Member
The Picaxe is what it is and does what it does.....what it can do it seems to do very well. For some tasks it's simply not fast enough. However there are many examples of 'creative coding' on this forum that can speed things up a bit. Such as converting gosubs to macros, using inline code instead of 'for next loops', etc. I don't really see the point in criticizing what the Picaxe can't do??
 

hippy

Technical Support
Staff member
Just for fun with the talk of oscilloscopes in the air I thought I'd see how well an AXE133Y 16x2 OLED board worked as an oscilloscope. It's not brilliant as it only has a resolution of 7 steps vertical and 80 horizontal with gaps but, with wire on C.0 and held to pick-up mains hum, it seems to capture 5.5 cycles of mains which gives a refresh rate of around 110 ms.

This code runs only on the AXE133Y OLED board; an LCD doesn't have the graphics mode the OLED does. It's thrown together and not optimised at all. I'll see how fast I can make an optimised version work later.

Code:
; .-----------------------------------------------------------------------------.
; |    AXE133Y OLED Analogue Oscilloscope                                       |
; `-----------------------------------------------------------------------------'

#Picaxe 18M2
#No_Data

; .-----------------------------------------------------------------------------.
; |    Variables                                                                |
; `-----------------------------------------------------------------------------'

Symbol reserveW0 = w0 ; b1:b0
Symbol row       = b2

; .-----------------------------------------------------------------------------.
; |    LCD connections                                                          |
; `-----------------------------------------------------------------------------'

Symbol pinE  = pinC.6 : Symbol dirE  = dirC.6   ; 0 = Idle      1 = Active
Symbol pinRS = pinC.7 : Symbol dirRS = dirC.7   ; 0 = Command   1 = Data

Symbol pinD0 = pinB.0 : Symbol dirD0 = dirB.0   ; LCD Data Line 0
Symbol pinD1 = pinB.1 : Symbol dirD1 = dirB.1   ; LCD Data Line 1
Symbol pinD2 = pinB.2 : Symbol dirD2 = dirB.2   ; LCD Data Line 2
Symbol pinD3 = pinB.3 : Symbol dirD3 = dirB.3   ; LCD Data Line 3
Symbol pinD4 = pinB.4 : Symbol dirD4 = dirB.4   ; LCD Data Line 4
Symbol pinD5 = pinB.5 : Symbol dirD5 = dirB.5   ; LCD Data Line 5
Symbol pinD6 = pinB.6 : Symbol dirD6 = dirB.6   ; LCD Data Line 6
Symbol pinD7 = pinB.7 : Symbol dirD7 = dirB.7   ; LCD Data Line 7

; .-----------------------------------------------------------------------------.
; |    Main Program                                                             |
; `-----------------------------------------------------------------------------'

PowerOnReset:

  Gosub InitialiseLcd

  SetFreq M32

  ; Populate EEPROM data

  For b1 = 0 To 255
    b2 = b1 / 37
    LookUp b2, (1,2,4,8,16,32,64), b0
    Read b1,b2
    If b2 <> b0 Then
      Write b1, b0
    End If
  Next

Do

  b0 = %01000001 : Gosub SendCmdByte  ; GYA 1
  b0 = %10000000 : Gosub SendCmdByte  ; GXA 0

; Include this to give a very crude trigger

; Do
;   ReadAdc C.0, b0
;   Read b0, b0
; Loop While b0 = 1

  For row = 0 To 79
    ReadAdc C.0, b0
    Read b0, b0
    Gosub SendDataByte
  Next

; b0 = %01000000 : Gosub SendCmdByte  ; GYA 0
; b0 = %10000000 : Gosub SendCmdByte  ; GXA 0

; For row = 0 To 79
;   ReadAdc C.0, b0
;   Read b0, b0
;   Gosub SendDataByte
; Next

Loop

; .-----------------------------------------------------------------------------.
; |    LCD initialisation routine                                               |
; `-----------------------------------------------------------------------------'

InitialiseLcd:

  dirE  = 1             ; Set LCD control lines as outputs
  dirRS = 1
  dirD0 = 1
  dirD1 = 1
  dirD2 = 1
  dirD3 = 1
  dirD4 = 1
  dirD5 = 1
  dirD6 = 1
  dirD7 = 1

  Pause 500

  For b1 = 0 To 7
    LookUp b1, ( $33,$33,$33, $3B,$0C,$06,$1F,$01 ), b0 : Gosub SendInitCmdByte
  Next

  ; Nibble commands - To initialise 8-bit mode
  ;
  ;   $33       %0011----               8-bit
  ;   $33       %0011----               8-bit
  ;   $33       %0011----               8-bit
  ;
  ; Byte commands - To configure the LCD or OLED
  ;
  ;                 LNFff
  ;   $3B       %00111011               Display Format
  ;
  ;               L : 0 = 4-bit Mode    1 = 8-bit Mode
  ;               N : 0 = 1 Line        1 = 2 Lines
  ;               F : 0 = 5x7 Pixels    1 = N/A
  ;
  ;               f : OLED Font table   00 English-Japanese
  ;                                     01 Western European 1
  ;                                     10 English-Russian
  ;                                     11 Western European 2
  ;
  ;                   DCB
  ;   $0C       %00001100               Display Control
  ;
  ;               D : 0 = Display Off   1 = Display On
  ;               C : 0 = Cursor Off    1 = Cursor On
  ;               B : 0 = Cursor Steady 1 = Cursor Flash
  ;
  ;                    IS
  ;   $06       %00000110               Cursor Move
  ;
  ;               I : 0 = Dec Cursor    1 = Inc Cursor
  ;               S : 0 = Cursor Move   1 = Display Shift
  ;
  ;                  GP
  ;   $1F       %00011111               Graphics Mode
  ;
  ;               G : 0 = Text Display  1 = Graphics Mode
  ;               P : 0 = Int Power Off 1 = Int Power On
  ;
  ;   $01       %00000001               Clear Screen
  ;
  ; Additional OLED Graphics commands
  ;
  ;   $80       %1xxxxxxx               GXA
  ;
  ;   $40       %0100000y               GYA 

  Return

; .-----------------------------------------------------------------------------.
; |    LCD interfacing routines                                                 |
; `-----------------------------------------------------------------------------'

SendInitCmdByte:

  Pause 15              ; Delay 15mS

SendCmdByte:

  pinRS = 0             ; Send to Command register

  Gosub SendDataByte

  If b0 <= 3 Then       ; Pause to allow Home or Clear to complete
    Pause 10
  End If

  Return

SendDataByte:

  pinD7 = bit7          ; Put out byte
  pinD6 = bit6
  pinD5 = bit5
  pinD4 = bit4
  pinD3 = bit3
  pinD2 = bit2
  pinD1 = bit1
  pinD0 = bit0

  pinE  = 1             ; Give a pulse on E
  pinE  = 0

  pinRS = 1             ; Send to Data register next

  Return

; .-----------------------------------------------------------------------------.
; |    End of program                                                           |
; `-----------------------------------------------------------------------------'
 

geezer88

Senior Member
Give Hippy a challenge, and he's all over it! I am having trouble with my homework, think you can do it for me? How about some help with painting this fence?

tom:cool:
 

stan74

Senior Member
The sentence below is true.
The sentence above is false.
No amount of coding got it working. It started then stopped and I can't test the spark and pull the string at the same time so I got an electric one from tesco.
 

techElder

Well-known member
Oh, Stan, the PICAXE also can't do what IBM's Watson or what Windows 10 can do, either. Are you intending to keep making a list of can't do it?

Perhaps this thread has run it's course?
 

Steve2381

Senior Member
There is stuff is can't do? I have been 9 months trying to get full artificial intelligence working on a 08m2 :(
 

erco

Senior Member
I have been 9 months trying to get full artificial intelligence working on a 08m2 :(
In Star Trek movie #1, V'ger became sentient by traveling through a black hole. My very messy workbench is nearly a black hole. If any of my robots can travel across that, it's real AI. Will advise.


The sentence below is true.
The sentence above is false.
From another movie 2010, isn't that logic an H.Moebius loop, which tears gaping rents in the very fabric of space-time?

Dr. Chandra: I don't care who it is. The situation was in conflict with the basic purpose of HAL's design: The accurate processing of information without distortion or concealment. He became trapped. The technical term is an H. Moebius loop, which can happen in advanced computers with autonomous goal-seeking programs.
 

stan74

Senior Member
Exactly Eric. It's a hobby and hobbies are something you do for fun. You start with a kodak instamatic then get a nikon or canon. Why?
Horses for courses? It's a fair analogy. You can take fantastic pictures with a box camera with a bit of imagination.
This tread has been repeated before for years. My point is my frustration that obviously I can't say try this,it's free.
You,Tex and other ex colonies posts don't get deleted if they're off topic. Ironic it's uk users that ruffle feathers.
Let's leave it and get on with life.
 

stan74

Senior Member
Just for fun with the talk of oscilloscopes in the air I thought I'd see how well an AXE133Y 16x2 OLED board worked as an oscilloscope. It's not brilliant as it only has a resolution of 7 steps vertical and 80 horizontal with gaps but, with wire on C.0 and held to pick-up mains hum, it seems to capture 5.5 cycles of mains which gives a refresh rate of around 110 ms.

This code runs only on the AXE133Y OLED board; an LCD doesn't have the graphics mode the OLED does. It's thrown together and not optimised at all. I'll see how fast I can make an optimised version work later.

Code:
; .-----------------------------------------------------------------------------.
; |    AXE133Y OLED Analogue Oscilloscope                                       |
; `-----------------------------------------------------------------------------'

#Picaxe 18M2
#No_Data

; .-----------------------------------------------------------------------------.
; |    Variables                                                                |
; `-----------------------------------------------------------------------------'

Symbol reserveW0 = w0 ; b1:b0
Symbol row       = b2

; .-----------------------------------------------------------------------------.
; |    LCD connections                                                          |
; `-----------------------------------------------------------------------------'

Symbol pinE  = pinC.6 : Symbol dirE  = dirC.6   ; 0 = Idle      1 = Active
Symbol pinRS = pinC.7 : Symbol dirRS = dirC.7   ; 0 = Command   1 = Data

Symbol pinD0 = pinB.0 : Symbol dirD0 = dirB.0   ; LCD Data Line 0
Symbol pinD1 = pinB.1 : Symbol dirD1 = dirB.1   ; LCD Data Line 1
Symbol pinD2 = pinB.2 : Symbol dirD2 = dirB.2   ; LCD Data Line 2
Symbol pinD3 = pinB.3 : Symbol dirD3 = dirB.3   ; LCD Data Line 3
Symbol pinD4 = pinB.4 : Symbol dirD4 = dirB.4   ; LCD Data Line 4
Symbol pinD5 = pinB.5 : Symbol dirD5 = dirB.5   ; LCD Data Line 5
Symbol pinD6 = pinB.6 : Symbol dirD6 = dirB.6   ; LCD Data Line 6
Symbol pinD7 = pinB.7 : Symbol dirD7 = dirB.7   ; LCD Data Line 7

; .-----------------------------------------------------------------------------.
; |    Main Program                                                             |
; `-----------------------------------------------------------------------------'

PowerOnReset:

  Gosub InitialiseLcd

  SetFreq M32

  ; Populate EEPROM data

  For b1 = 0 To 255
    b2 = b1 / 37
    LookUp b2, (1,2,4,8,16,32,64), b0
    Read b1,b2
    If b2 <> b0 Then
      Write b1, b0
    End If
  Next

Do

  b0 = %01000001 : Gosub SendCmdByte  ; GYA 1
  b0 = %10000000 : Gosub SendCmdByte  ; GXA 0

; Include this to give a very crude trigger

; Do
;   ReadAdc C.0, b0
;   Read b0, b0
; Loop While b0 = 1

  For row = 0 To 79
    ReadAdc C.0, b0
    Read b0, b0
    Gosub SendDataByte
  Next

; b0 = %01000000 : Gosub SendCmdByte  ; GYA 0
; b0 = %10000000 : Gosub SendCmdByte  ; GXA 0

; For row = 0 To 79
;   ReadAdc C.0, b0
;   Read b0, b0
;   Gosub SendDataByte
; Next

Loop

; .-----------------------------------------------------------------------------.
; |    LCD initialisation routine                                               |
; `-----------------------------------------------------------------------------'

InitialiseLcd:

  dirE  = 1             ; Set LCD control lines as outputs
  dirRS = 1
  dirD0 = 1
  dirD1 = 1
  dirD2 = 1
  dirD3 = 1
  dirD4 = 1
  dirD5 = 1
  dirD6 = 1
  dirD7 = 1

  Pause 500

  For b1 = 0 To 7
    LookUp b1, ( $33,$33,$33, $3B,$0C,$06,$1F,$01 ), b0 : Gosub SendInitCmdByte
  Next

  ; Nibble commands - To initialise 8-bit mode
  ;
  ;   $33       %0011----               8-bit
  ;   $33       %0011----               8-bit
  ;   $33       %0011----               8-bit
  ;
  ; Byte commands - To configure the LCD or OLED
  ;
  ;                 LNFff
  ;   $3B       %00111011               Display Format
  ;
  ;               L : 0 = 4-bit Mode    1 = 8-bit Mode
  ;               N : 0 = 1 Line        1 = 2 Lines
  ;               F : 0 = 5x7 Pixels    1 = N/A
  ;
  ;               f : OLED Font table   00 English-Japanese
  ;                                     01 Western European 1
  ;                                     10 English-Russian
  ;                                     11 Western European 2
  ;
  ;                   DCB
  ;   $0C       %00001100               Display Control
  ;
  ;               D : 0 = Display Off   1 = Display On
  ;               C : 0 = Cursor Off    1 = Cursor On
  ;               B : 0 = Cursor Steady 1 = Cursor Flash
  ;
  ;                    IS
  ;   $06       %00000110               Cursor Move
  ;
  ;               I : 0 = Dec Cursor    1 = Inc Cursor
  ;               S : 0 = Cursor Move   1 = Display Shift
  ;
  ;                  GP
  ;   $1F       %00011111               Graphics Mode
  ;
  ;               G : 0 = Text Display  1 = Graphics Mode
  ;               P : 0 = Int Power Off 1 = Int Power On
  ;
  ;   $01       %00000001               Clear Screen
  ;
  ; Additional OLED Graphics commands
  ;
  ;   $80       %1xxxxxxx               GXA
  ;
  ;   $40       %0100000y               GYA 

  Return

; .-----------------------------------------------------------------------------.
; |    LCD interfacing routines                                                 |
; `-----------------------------------------------------------------------------'

SendInitCmdByte:

  Pause 15              ; Delay 15mS

SendCmdByte:

  pinRS = 0             ; Send to Command register

  Gosub SendDataByte

  If b0 <= 3 Then       ; Pause to allow Home or Clear to complete
    Pause 10
  End If

  Return

SendDataByte:

  pinD7 = bit7          ; Put out byte
  pinD6 = bit6
  pinD5 = bit5
  pinD4 = bit4
  pinD3 = bit3
  pinD2 = bit2
  pinD1 = bit1
  pinD0 = bit0

  pinE  = 1             ; Give a pulse on E
  pinE  = 0

  pinRS = 1             ; Send to Data register next

  Return

; .-----------------------------------------------------------------------------.
; |    End of program                                                           |
; `-----------------------------------------------------------------------------'
If that's doing what I think, it's clever. I have a 2 line lcd somewhere,1 that you send 4 bits twice. I may try that code. A vid would be handy. You may be interested,a bloke just sent me a vid of how to speed up any glcd that uses a buffer by checking the bit in the buffer and if it hasn't changed don't send the byte to the screen.
 

tmfkam

Senior Member
Just for fun with the talk of oscilloscopes in the air I thought I'd see how well an AXE133Y 16x2 OLED board worked as an oscilloscope. It's not brilliant as it only has a resolution of 7 steps vertical and 80 horizontal with gaps but, with wire on C.0 and held to pick-up mains hum, it seems to capture 5.5 cycles of mains which gives a refresh rate of around 110 ms.

This code runs only on the AXE133Y OLED board; an LCD doesn't have the graphics mode the OLED does. It's thrown together and not optimised at all. I'll see how fast I can make an optimised version work later.
If ever there was a reason for getting an OLED, I think I've found mine...
 
Top