• AVR Freaks

Oscilloscope and signal generator.

Page: 12 > Showing page 1 of 2
Author
arry
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/01/06 13:56:48
  • Location: 0
  • Status: offline
2010/09/09 13:20:18 (permalink)
0

Oscilloscope and signal generator.

Thanks to you, this project is now complete.

Have a look: http://www.youtube.com/watch?v=OliFeiaVIIw .

Here is a little info: 

         1 channel oscilloscope 
         Measures from 0.1Hz to 25kHz and from 0V to 12V. 

         Zoom signal in time and amplitude 
         Pan signal in all directions: up, down, left, right 
         Hold mode, 
         calculates: frequency, min and max levels of displayed signal, 
                           time and levels between horizontal and vertical cursors    


         Signal generator: square signal adjustable: from 1Hz up to 15kHz, from 0V to 5V, duty cycle 



Parts: 
         pic18f4550 
         glcd AG-16080B (LC7981) 
         2x MCP6022 
         MCP41010 
         Trimmer 50K 
         4x Pots 10K      
         2x buttons 

Thank you for supporting.

post edited by arry - 2010/09/14 12:01:19

Attached Image(s)

#1

20 Replies Related Threads

    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/09/09 13:32:49 (permalink)
    0
    WOW Smile Hell's bells !

    Nice project, congratulations!

    GENOVA :D :D ! GODO
    #2
    Undefined
    Senior Member
    • Total Posts : 129
    • Reward points : 0
    • Joined: 2009/06/18 01:21:22
    • Location: Kempton Park, South Africa
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/09/10 09:38:52 (permalink)
    0
    Amazing!
    Congrats.
    #3
    arry
    Starting Member
    • Total Posts : 34
    • Reward points : 0
    • Joined: 2010/01/06 13:56:48
    • Location: 0
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/09/10 10:51:22 (permalink)
    0
    Thanks! It would not have been possible without you.


    post edited by arry - 2010/09/11 00:03:58
    #4
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/06 02:44:19 (permalink)
    0
    Hi Arry, I would be interested in making up an adapted version of your scope for T6963 LCD - on a board I've been using since long.
    Will try and let you (all) know how it goes.

    GENOVA :D :D ! GODO
    #5
    kenn
    Super Member
    • Total Posts : 226
    • Reward points : 0
    • Joined: 2008/01/19 09:23:48
    • Location: Toronto ON
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/06 16:28:34 (permalink)
    0
    [8D].. Awesome!

    Downloaded and bookmarked for a winter project.

    Thanks alot for sharing this with us.Smile.

    what, me assemble?
    #6
    arry
    Starting Member
    • Total Posts : 34
    • Reward points : 0
    • Joined: 2010/01/06 13:56:48
    • Location: 0
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/07 00:36:07 (permalink)
    0
    Hi DarioG. When I look back now, the only draw back of this project is that the uC is too slow and as a result the refresh rate of the
    Lcd is not as fast as I would like it to be. I have tried to decrease the refresh rate (cLcdRefreshPeriodUs = 80000 ) but not much difference there. I also made a complex procedure for drawing on the Lcd by sending the pixels grouped in bytes, not pixel by pixel, but again not much difference there.  So if you can, use a faster uC.

    Lately I saw a statistic on the web that the HI-TECH compiler generates 4 times less code than MPLAB C18. 
    If we compile the project with HI-TECH, do you think it will get much faster?

    Anyway if you have any questions concerning the sources, I would be glad to help. 
    #7
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/07 02:17:14 (permalink)
    0
    Thanks for the tips Smile

    Yes in fact I have to say that the most amazing part of your project is that you could do so much with such a little PIC! (and a friend of mine commented the same).

    I took a look at your code and I saw that you're not using Extended Mode: this can help a bit a or a lot, depending on the tipe of code.
    Also, I'll probably use a 4550-based board that I already have, and this PIC can run @48MHz; I'd love to use a 24F or 24H part, but they are a bit (only a crazy bit) not pin-compatible to that board.

    Anyway, I often perform local-optimization in assembler "at hand" when needed, so I can take a look later.

    GENOVA :D :D ! GODO
    #8
    kenn
    Super Member
    • Total Posts : 226
    • Reward points : 0
    • Joined: 2008/01/19 09:23:48
    • Location: Toronto ON
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/07 15:55:19 (permalink)
    0
    arry When I look back now, the only drawback of this project is that the uC is too slow and as a result the refresh rate of the
    Lcd is not as fast as I would like it to be. I


    arry, if you could start over, what PIC would you choose?



    what, me assemble?
    #9
    arry
    Starting Member
    • Total Posts : 34
    • Reward points : 0
    • Joined: 2010/01/06 13:56:48
    • Location: 0
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/08 00:49:16 (permalink)
    0
    Well, I have not thought about it, but probably some pic24 30 MIPS :)
    #10
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/13 14:14:30 (permalink)
    0
    Hi Arry,
    do you have a chance to send me the bitmaps used in the code, with a size of 128x64 instead of 160x80? (since that one is the size of my display)...

    thank you very much!

    GENOVA :D :D ! GODO
    #11
    arry
    Starting Member
    • Total Posts : 34
    • Reward points : 0
    • Joined: 2010/01/06 13:56:48
    • Location: 0
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/15 11:08:48 (permalink)
    0
    Hi Dario,

    I have attached the bitmap that I use as a first page.
    If you want any of the other bitmaps that were commented in the code just tell me which one?



    #12
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/15 13:37:20 (permalink)
    0
    Thank you very much!
    I found other bitmaps but they were commented out: but if you feel like sending to me, please do, I may put them in use.

    Code porting is complete, only need to test it Smile

    Actually I found out that you used one SPI trimpot: so could you also share a schematic for the whole device?
    thanks again

    GENOVA :D :D ! GODO
    #13
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/16 01:21:18 (permalink)
    0
    Ooops, of course it was in your first post Smile

    sorry then. got it.

    PS: as for the bitmaps, I'd need the "Res_Shut" one in 128x64... as from your code.
    Of course I can put in there anything different.. but if you can provide it, the better Smile
    post edited by DarioG - 2010/10/16 01:26:10

    GENOVA :D :D ! GODO
    #14
    arry
    Starting Member
    • Total Posts : 34
    • Reward points : 0
    • Joined: 2010/01/06 13:56:48
    • Location: 0
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/16 02:41:35 (permalink)
    0
    Hi, 

    aaa "Res_Shut" ... I attached it in post #12, it is just under a different name (Res_Villian128), but it is the same bitmap :)

    Go test and post a video :) I'm impatient :)
    #15
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/10/16 11:35:49 (permalink)
    0
    ah ok!! Smile
    I had not had a chance to see it "expanded" in the code !
    thx

    GENOVA :D :D ! GODO
    #16
    arry
    Starting Member
    • Total Posts : 34
    • Reward points : 0
    • Joined: 2010/01/06 13:56:48
    • Location: 0
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/12/10 06:38:34 (permalink)
    0
    Compiled with Extended instructions enabled and made several optimizations. Now code runs 3 times faster :). 

    Here is how a sound wave from mp3 moves : http://www.youtube.com/watch?v=3au2x7MZ0mU . 
    Set resolution to 480p, as it is a little smudged by the compression.
    [font="verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; line-height: normal; font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "]Problem is, a pixel rise time is 250ms, while the Lcd is refreshed on aprx. 120ms in software. That's why the sound wave is half visible.
    [font="verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif"]
    An adjustable trigger function is also added as a new feature.

    post edited by arry - 2010/12/12 11:48:22
    #17
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2010/12/10 07:56:39 (permalink)
    0
    ehi, good!!

    GENOVA :D :D ! GODO
    #18
    cezarm
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2011/07/11 18:39:54
    • Location: Montreal
    • Status: offline
    Re:Oscilloscope and signal generator. 2011/08/01 12:39:12 (permalink)
    0
    DarioG

    Hi Arry,
    do you have a chance to send me the bitmaps used in the code, with a size of 128x64 instead of 160x80? (since that one is the size of my display)...

    thank you very much!


    Hi Dario,
    Sorry for bringing this topic to life after months, but it is an awfully (grin) interesting topic. Have you managed to transform it for 128x64 LCD? If yes, would you share the code with the other users, even the HEX only.

    Thanks!
    Cezar

    PS: You should always check the schematic twice! It is worthed!
    #19
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re:Oscilloscope and signal generator. 2011/08/01 23:37:29 (permalink)
    0
    Hi, I did convert the code almost completely, but never tested it!

    I can send it to you: give me an email...

    GENOVA :D :D ! GODO
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2021 APG vNext Commercial Version 4.5