Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Gave myself an xmas gift - OWON HDS1022M-N Scope

Status
Not open for further replies.
Almost as good as a real scope.
 
...and just when I was embracing "Peace on earth and good will toward Gophers" *sigh* :p
Common, my definition of "real scope" is anything made before 1990 and most folk feel the need to add the word, "analog" when they talk about it.
 
Common, my definition of "real scope" is anything made before 1990 and most folk feel the need to add the word, "analog" when they talk about it.
n/p just "giving some back". But, to your point, I have had opportunities to get a "real" scope before, but I just do not want some 80 lb unit on a wheels that co-functions as a heater with a tattered manual and "a few deficiencies". Get what you can get and all that, but I wanted a simple upgrade - a fun toy not a salvage project (not that there is anything wrong with that).

Also, while I am not confident in providing a product review, it is my hope that there could be a few visitors that actually know less about ocilliscopes than I do and might benefit by the thread. On the otherhand, if anyone thinks my motives are purely altruistic, I will not hesitate to ask others when I get stuck) and I will get stuck.

Anyways, so far I am having a blast and my only complaint is that the case is really not aluminum (it's plastic and chinesium). This will seriously put a dent in my quest to pick up hot babes at $tarbucks :)
 
Time for a wave form of my own generation.

This is from a PIC1840, "fake" sinewave that I did some time ago for some reason.

OWON_sine_160245.jpg


Sweet.

For anybody interested:
This is the schematic:
PICsw2.jpg


and the code:
Code:
/*
 * File:   main.c
 * Author: DrG
 * Use it at your own risk *
 */

#include <xc.h>

#pragma config FOSC=INTOSC, PLLEN=OFF, WDTE=OFF, MCLRE=ON,
#pragma config CLKOUTEN=OFF, IESO=OFF, FCMEN=OFF,CP=OFF, CPD=OFF,BOREN=OFF
#pragma config WRT=OFF,STVREN=ON,BORV=LO,LVP=OFF

#define _XTAL_FREQ  16000000        // this is used by the __delay_ms(xx) and __delay_us(xx) functions

     unsigned char Dcount =0;
     const char SINETABLE[40]=
     {
     50,55,60,65,70,75,80,85,90,95,
     100,95,90,85,80,75,70,65,60,55,
     50,45,40,35,30,25,20,15,10,5,
     0,5,10,15,20,25,30,35,40,45
     };
     
     /*
      * These are the duty cycle percentages for the sine wave
      50, 58, 65, 73, 79, 85, 90, 95, 98, 99,
     100, 99, 98, 95, 90, 85, 79, 73, 65, 58,
      50, 42, 35, 27, 21, 15, 10,  5,  2,  1,
       0,  1,  2,  5, 10, 15, 21, 27, 35, 42
     */
    const unsigned char DCThigh[40]=
     {
        128,148,166,186,202,217,230,242,250,252,
        255,252,250,242,230,217,202,186,166,148,
        128,107, 89, 69, 54, 38, 26, 13,  5,  2,
          0,  2,  5, 13, 26, 38, 54, 69, 89,107    
     };
    const unsigned char DCTlow[40]=
     {
        2,0,3,1,2,3,2,1,0,2,
        0,2,0,1,2,3,2,1,3,0,
        2,0,1,3,2,1,2,3,0,2,
        0,2,0,3,2,1,2,3,1,0
     };
     
    void main(){
     OSCCON = 0x7A; 
// Fosc = 16 MHz with internal oscillator
    __delay_us(100);
// Timer2 configuration for PWM
   PR2 = 0xfe;          
// PWM period register for 40 kHz
   T2CON = 0x4; 
// PWM 1 configuration          
    CCP1CONbits.CCP1M=0x0C;     // select PWM mode for CCP module
    CCP1CONbits.P1M=0x00;    // select single output on CCP1 pin (RA2) PIN 5
// PWM1 on, PWM 1 output enable
    CCPR1L =  0x00;             // clear high 8 bits of PWM duty cycle
    CCP1CONbits.DC1B=0x00;    // clear low 2 bits of PWM Duty cycle
    
// load starting duty cycle    
    CCPR1L=DCThigh[Dcount]; 
    CCP1CONbits.DC1B=DCTlow[Dcount];
    
    PIE1bits.TMR2IE =1;       
// Timer2 interrupt enable
    INTCON =0xC0;             
    TRISA=0x00;         
    ANSELA=0x00;
    here: goto here;
     }
         
    void interrupt Timer2_ISR(void)
    {
       if (TMR2IF)
       {
           ++Dcount;      
// Increment the counter variable by 1
           if(Dcount == 39)
           {
              Dcount = 0;
           } 
           CCPR1L=DCThigh[Dcount]; 
           CCP1CONbits.DC1B=DCTlow[Dcount];
          TMR2IF = 0;
       }
    }

Although I did do the circuit and code, the technique is not at all new or original.

edited: got rid of a bunch of comments in the code
 
Last edited:
(it's plastic and chinesium)
That is a good one - I somehow never heard it before. Is chinesium your creative wonder or did you hear it elsewhere? Either way, I'm going to borrow that one often.
 
A few waveforms from a very old and discarded (broken) frequency generator that was given to me (and that I actually managed to get functional again).

OWON sw_201407.jpg

OWON tw_201512.jpg
 
This was one of the "goals", I2C transactions.

OWON i2c_195837.jpg


SCL on top of SDA. It works, but I think I can get it better. I am fumbling around a lot with the scales and settings and so on.
 
Some of the better and now even cheaper ones will decode certain buses for you, like I2c.
 
This was my first try at saving the screen using a USB memory stick. Just hit the copy button.
20180804_232101.jpg


They are small and I don't see any way of changing that. Saves as a BMP or Vector file. Above is the .bmp which I converted to a .jpg.
.bmps enlarge pretty well, e.g., below.

20180804_232131L.jpg


I don't know, off hand, how to view the .bin Vector files - would need to do some reading on that.
BTW: the 5V, 1KHz waveform above is from the reference brick and I have persistence on, which smoothes/thickens the wave - there are a couple options there.

Today, I want to check out the PC software.
 
Today, I want to check out the PC software.

That software is exactly what you need to view the vector (.bin) files if you save waveform images. Vector format lets you scale the image larger without pixelizing the image.
 
That software is exactly what you need to view the vector (.bin) files if you save waveform images. Vector format lets you scale the image larger without pixelizing the image.

Ahh. Good to hear. That means that I will get to it and it will answer that question. Thx.
 
A handhelp one might, however a saleae logic analyser is only a few quid, but it does need a pc.
 
saleae logic analyser

Don't know what the quid to dollar is, but this one is about 1K :) I'm sure there are cheaper ones and those are what you are probably referring to. I don't know, but I have seen some pretty nifty stuff done with a bus pirate - always wanted one. Anyways, thks, I'll get there (maybe).
 
Thats the one.
I've used for I2c, serial and can, it works.
A quid is about 1.25 us.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top