Difference between revisions of "PoLabs PoScope Mega50"

From sigrok
Jump to navigation Jump to search
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The [https://www.poscope.com/product/poscope-mega50/ PoLabs PoScope Mega50] is a mixed signal oscilloscope with 2 analog channels (8 bits each) and 2 digital ports (16 digital lines in summary).


== '''Hardware''' ==
...


- ''Cypress'' CY7C68013A-56: USB Microcontroller
See [[PoLabs PoScope Mega50/Info]] for some more details (such as '''lsusb -v''' output) on the device.


- ''Analog Devices'' AD9288: 8-Bit Dual A/D Converter
== Hardware ==


- ''NXP'' LPC1111F: Cortex-M0 based microcontroller (For the output probably)
* ''Cypress'' CY7C68013A-56: USB Microcontroller
* ''Analog Devices'' AD9288: 8-Bit Dual A/D Converter
* ''NXP'' LPC1111F: Cortex-M0 based microcontroller (For the output probably)
* ''NXP'' PCA9555: 16 I/O CMOS device
* 4x ''Nexpia'' 74HC4052: Dual 4-channel analog multiplexer/demultiplexer (two per analog channel)
* ''Microchip'' 24lc128i: I2C EEPROM
* 2x ''Nexpia'' 74HC245: Octal bus transceiver
* ''TI'' LM358: opamp


- ''NXP'' PCA9555: 16 I/O CMOS device
== Photos ==


- 4x ''Nexpia'': 74HC4052: Dual 4-channel analog multiplexer/demultiplexer (two per analog channel)


[[File:PoScopeMx50 PCB.JPG|200px]]
[[File:PoscopeMx50 inside.JPG|200px]]
[[File:Poscope_inside_2.JPG|200px]]


== Protocol ==


== '''Photos''' ==
The main communication when setting it up/changing configuration always goes like this:


Coming soon


The host sends a "URB_BULK out" command where there are 64 bytes of data.


The device sends a packet with 4 times 0x00 as data


== '''Protocol''' ==
The host returns the same data but with an 0x00 instead of an 0x01 at byte 16


The device returns a "URB_BULK in" command with a lot of data in the 64 bytes of data.




== '''lsusb''' ==




'''lsusb''':  Bus 001 Device 005: ID 0404:0081 NCR Corp
'''The setup:'''


'''lsusb -vvv -d 0404:0081''':
// In the following examples, I'm only talking about the 64 bytes of data, because (I think) everything else gets handled by the driver itself


Bus 001 Device 014: ID 0404:0081 NCR Corp.
//I'm making assumptions about what the commands do
Couldn't open device, some information will be missing
 
Device Descriptor:
'''Booting:'''
  bLength                18
 
  bDescriptorType        1
the host sends 0xa2 followed by 63 0x00
  bcdUSB              2.00
 
   bDeviceClass            0
the host sends 0xa8 followed by 63 0x00
   bDeviceSubClass        0
 
   bDeviceProtocol        0
 
   bMaxPacketSize0        64
 
   idVendor          0x0404 NCR Corp.
the host sends 0xa4 + 0x30 + 0x00 + 0x20 + 60 * 0x00
   idProduct          0x0081
 
   bcdDevice            0.00
now, the host counts bytes 1 and 2 up in 0x20 steps, always 0xa4 at byte 0 like that:
   iManufacturer          1
 
   iProduct                2
this is probably to clean out old values
  iSerial                0
 
  bNumConfigurations      1
 
  Configuration Descriptor:
<table>
     bLength                9
<tr>
     bDescriptorType        2
    <th>byte 0</th>
     wTotalLength      0x002e
    <th>1</th>
     bNumInterfaces          1
    <th>2</th>
     bConfigurationValue     1
    <th>3</th>
     iConfiguration          0
    <th>4-64</th>
     bmAttributes        0x80
   </tr>
      (Bus Powered)
   <tr>
    MaxPower              500mA
    <th>0xa4 + </th>
    Interface Descriptor:
    <th>0x30 + </th>
      bLength                9
    <th>'''0x20''' + </th>
      bDescriptorType        4
    <th>0x20 + </th>
      bInterfaceNumber        0
    <th>60 * 0x00</th>
      bAlternateSetting      0
   </tr>
      bNumEndpoints          4
<tr>
      bInterfaceClass      255 Vendor Specific Class
    <th>0xa4 + </th>
      bInterfaceSubClass      0
    <th>0x30 + </th>
      bInterfaceProtocol      0
    <th>'''0x40''' + </th>
      iInterface              0
    <th>0x20 + </th>
      Endpoint Descriptor:
    <th>60 * 0x00</th>
        bLength                7
   </tr>
        bDescriptorType        5
<tr>
        bEndpointAddress    0x01 EP 1 OUT
    <th>0xa4 + </th>
        bmAttributes            2
    <th>0x30 + </th>
          Transfer Type            Bulk
    <th>'''0x60''' + </th>
          Synch Type              None
    <th>0x20 + </th>
          Usage Type              Data
    <th>60 * 0x00</th>
        wMaxPacketSize    0x0040  1x 64 bytes
   </tr>
        bInterval              0
<tr>
      Endpoint Descriptor:
    <th>0xa4 + </th>
        bLength                7
    <th>0x30 + </th>
        bDescriptorType        5
    <th>'''0x80''' + </th>
        bEndpointAddress    0x81  EP 1 IN
    <th>0x20 + </th>
        bmAttributes            2
    <th>60 * 0x00</th>
          Transfer Type            Bulk
   </tr>
          Synch Type              None
<tr>
          Usage Type              Data
    <th>0xa4 + </th>
        wMaxPacketSize    0x0040  1x 64 bytes
    <th>0x30 + </th>
        bInterval              0
    <th>'''0xa0''' + </th>
      Endpoint Descriptor:
    <th>0x20 + </th>
        bLength                7
    <th>60 * 0x00</th>
        bDescriptorType        5
   </tr>
        bEndpointAddress    0x02  EP 2 OUT
<tr>
        bmAttributes            2
    <th>0xa4 + </th>
          Transfer Type            Bulk
    <th>0x30 + </th>
          Synch Type              None
    <th>'''0xc0''' + </th>
          Usage Type              Data
    <th>0x20 + </th>
        wMaxPacketSize    0x0200  1x 512 bytes
    <th>60 * 0x00</th>
        bInterval              0
   </tr>
      Endpoint Descriptor:
<tr>
        bLength                7
    <th>0xa4 + </th>
        bDescriptorType        5
    <th>0x30 + </th>
        bEndpointAddress    0x86  EP 6 IN
    <th>'''0xe0''' + </th>
        bmAttributes            2
    <th>0x20 + </th>
          Transfer Type            Bulk
    <th>60 * 0x00</th>
          Synch Type              None
   </tr>
          Usage Type              Data
<tr>
        wMaxPacketSize    0x0200  1x 512 bytes
    <th>0xa4 + </th>
        bInterval              0
    <th>0x31 + </th>
     <th>'''0x00''' + </th>
     <th>0x20 + </th>
     <th>60 * 0x00</th>
  </tr>
<tr>
     <th>0xa4 + </th>
     <th>0x31 + </th>
     <th>'''0x20''' + </th>
     <th>0x20 + </th>
     <th>60 * 0x00</th>
  </tr>
 
</table>
until byte 1 is 0x3f and byte 2 is 0xe0
 
then the host sends: 0xa4 + 0x40 + 0x00 + 0x00 + 60 * 0x00
 
 
Starting (setting modes and other stuff probably):
 
<table>
<tr>
<th>0xa5 + </th>
<th>0x28 + </th>
<th>0x01 + </th>
<th>0x01 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
</tr>
<tr>
<th>0xa6 + </th>
<th>0x28 + </th>
<th>0x07 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
</tr>
<tr>
<th>0xa5 + </th>
<th>0x28 + </th>
<th>0x01 + </th>
<th>0x06 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
</tr>
<tr>
<th>0xa5 + </th>
<th>0x28 + </th>
<th>0x01 + </th>
<th>0x01 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
</tr>
<tr>
<th>0xa6 + </th>
<th>0x28 + </th>
<th>0x07 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
</tr>
<tr>
<th>0x06 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
<th>maybe initializes mode change. always comes before b2</th>
</tr>
<tr>
<th>0xb2 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x01 + </th>
<th>0xe0 + </th>
<th>0x14 + </th>
<th>58 * 0x00</th>
<th>b2 could set the mode. it repeats with other data when switching modes</th>
</tr>
<tr>
<th>0x05 + </th>
<th>0xc7 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>0x00 + </th>
<th>58 * 0x00</th>
</tr>
</table>
 
 
after that you can ask for data with:
 
  0ad5ffff000000000900000100ff00860300000000
 
== Resources ==
 
* [https://www.poscope.com/product/poscope-mega50/ vendor device page]

Latest revision as of 12:28, 6 January 2020

The PoLabs PoScope Mega50 is a mixed signal oscilloscope with 2 analog channels (8 bits each) and 2 digital ports (16 digital lines in summary).

...

See PoLabs PoScope Mega50/Info for some more details (such as lsusb -v output) on the device.

Hardware

  • Cypress CY7C68013A-56: USB Microcontroller
  • Analog Devices AD9288: 8-Bit Dual A/D Converter
  • NXP LPC1111F: Cortex-M0 based microcontroller (For the output probably)
  • NXP PCA9555: 16 I/O CMOS device
  • 4x Nexpia 74HC4052: Dual 4-channel analog multiplexer/demultiplexer (two per analog channel)
  • Microchip 24lc128i: I2C EEPROM
  • 2x Nexpia 74HC245: Octal bus transceiver
  • TI LM358: opamp

Photos

PoScopeMx50 PCB.JPG PoscopeMx50 inside.JPG Poscope inside 2.JPG

Protocol

The main communication when setting it up/changing configuration always goes like this:


The host sends a "URB_BULK out" command where there are 64 bytes of data.

The device sends a packet with 4 times 0x00 as data

The host returns the same data but with an 0x00 instead of an 0x01 at byte 16

The device returns a "URB_BULK in" command with a lot of data in the 64 bytes of data.



The setup:

// In the following examples, I'm only talking about the 64 bytes of data, because (I think) everything else gets handled by the driver itself

//I'm making assumptions about what the commands do

Booting:

the host sends 0xa2 followed by 63 0x00

the host sends 0xa8 followed by 63 0x00


the host sends 0xa4 + 0x30 + 0x00 + 0x20 + 60 * 0x00

now, the host counts bytes 1 and 2 up in 0x20 steps, always 0xa4 at byte 0 like that:

this is probably to clean out old values


byte 0 1 2 3 4-64
0xa4 + 0x30 + 0x20 + 0x20 + 60 * 0x00
0xa4 + 0x30 + 0x40 + 0x20 + 60 * 0x00
0xa4 + 0x30 + 0x60 + 0x20 + 60 * 0x00
0xa4 + 0x30 + 0x80 + 0x20 + 60 * 0x00
0xa4 + 0x30 + 0xa0 + 0x20 + 60 * 0x00
0xa4 + 0x30 + 0xc0 + 0x20 + 60 * 0x00
0xa4 + 0x30 + 0xe0 + 0x20 + 60 * 0x00
0xa4 + 0x31 + 0x00 + 0x20 + 60 * 0x00
0xa4 + 0x31 + 0x20 + 0x20 + 60 * 0x00

until byte 1 is 0x3f and byte 2 is 0xe0

then the host sends: 0xa4 + 0x40 + 0x00 + 0x00 + 60 * 0x00


Starting (setting modes and other stuff probably):

0xa5 + 0x28 + 0x01 + 0x01 + 0x00 + 0x00 + 58 * 0x00
0xa6 + 0x28 + 0x07 + 0x00 + 0x00 + 0x00 + 58 * 0x00
0xa5 + 0x28 + 0x01 + 0x06 + 0x00 + 0x00 + 58 * 0x00
0xa5 + 0x28 + 0x01 + 0x01 + 0x00 + 0x00 + 58 * 0x00
0xa6 + 0x28 + 0x07 + 0x00 + 0x00 + 0x00 + 58 * 0x00
0x06 + 0x00 + 0x00 + 0x00 + 0x00 + 0x00 + 58 * 0x00 maybe initializes mode change. always comes before b2
0xb2 + 0x00 + 0x00 + 0x01 + 0xe0 + 0x14 + 58 * 0x00 b2 could set the mode. it repeats with other data when switching modes
0x05 + 0xc7 + 0x00 + 0x00 + 0x00 + 0x00 + 58 * 0x00


after that you can ask for data with:

  0ad5ffff000000000900000100ff00860300000000

Resources