Difference between revisions of "Lcsoft Mini Board"

From sigrok
Jump to navigation Jump to search
m
 
(20 intermediate revisions by 11 users not shown)
Line 8: Line 8:
| samplerate_state = —
| samplerate_state = —
| triggers        = none (SW-only)
| triggers        = none (SW-only)
| voltages        = ?
| voltages        = -0.5V — 5.25V
| threshold        = Fixed: VIH=2.0V—5.25V, VIL=-0.5V—0.8V
| memory          = none
| memory          = none
| compression      = none
| compression      = none
| website          = [http://www.lctech-inc.com/Hardware/Detail.aspx?id=7cadef7b-359a-4e3d-b980-76ffa15171e0 lctech-inc.com]
| website          = [http://www.lctech-inc.com/Hardware/Detail.aspx?id=7cadef7b-359a-4e3d-b980-76ffa15171e0 lctech-inc.com], [http://www.geeetech.com/wiki/index.php/CY7C68013 geeetech.com]
}}
}}


Line 20: Line 21:
In sigrok, we use the open-source [[fx2lafw]] firmware for this logic analyzer.
In sigrok, we use the open-source [[fx2lafw]] firmware for this logic analyzer.


See [[Lcsoft Mini Board/Info]] for some more details (such as '''lsusb -vvv''' output) on the device.
See [[Lcsoft Mini Board/Info]] for some more details (such as '''lsusb -v''' output) on the device.
 
There is a very similar board made by Geeetech, it has near-identical components but a slightly different layout.


== Hardware ==
== Hardware ==


* '''Main chip''': Cypress CY7C68013A-56PVXC (FX2LP)
* '''Main chip''': Cypress CY7C68013A-56PVXC (FX2LP)
* '''3.3V voltage regulator''': Advanced Monolithic Systems ASM1117-3.3
* '''3.3V voltage regulator''': Advanced Monolithic Systems AMS1117-3.3
* '''16kB I2C EEPROM''': Atmel AT24C128A
* '''16kB I2C EEPROM''': Atmel AT24C128A
* '''24MHz crystal''': JY24.0000601
* '''24MHz crystal''': JY24.0000601


All the pins on the FX2(LP) are broken out to 40 header pins. There's an on/off toggle switch, a reset button, and a jumper that lets you select whether the FX2LP gets its configuration from a small EEPROM, or boots into the default mode. The EEPROM's default settings make it come up with the same VID:PID as a [[Saleae Logic]].
All the pins on the FX2(LP) are broken out to 40 header pins. There's an on/off toggle switch, a reset button, and a jumper that lets you select whether the FX2LP gets its configuration from a small EEPROM, or boots into the default mode. The EEPROM is usually provided programmed such that it enumerates with the same VID:PID as a [[Saleae Logic]].
 
By default the chip will boot in some internal bootloader which allows loading (and executing) from USB to the internal RAM. Sigrok will typically use the [[fx2lafw]] firmware for this (aka "load-on-probe").
 
The EEPROM can be programmed with a firmware. The jumper allows to select whether the chip will boot on the EEPROM or the usual load-on-probe. This can be used for example to switch easily between a 16-channel (PB0-PB7, PD0-PD7) firmware and a 8-channel (PB0-PB7) one.
 
The Cypress has no DAC and can't by itself have any analog output. Other Cypress-based board have an external DAC, typically connected to 8 pins of the FX2, but this very one doesn't have any DAC.
 


== Photos ==
== Photos ==
Line 35: Line 45:
<gallery>
<gallery>
File:lcsoft-miniboard-front.png|<small>PCB, front</small>
File:lcsoft-miniboard-front.png|<small>PCB, front</small>
File:lcsoft-fx2-pcb-top.png|<small>PCB, front</small>
File:lcsoft-miniboard-back.png|<small>PCB, back</small>
File:lcsoft-miniboard-back.png|<small>PCB, back</small>
File:Lcsoft mini board ams1117.jpg|<small>A.M.S. AMS1117</small>
File:Lcsoft mini board ams1117.jpg|<small>A.M.S. AMS1117</small>
Line 42: Line 53:
</gallery>
</gallery>


== Protocol ==
'''Geeetech version''':


Since we use the open-source [[fx2lafw]] firmware for this device, we don't need to know the protocol.
[http://www.geeetech.com/wiki/index.php/CY7C68013 Geeetech product page]


== Flashing fx2lafw to the EEPROM ==
<gallery>
 
File:Geeetech_CY7C68013.jpg|<small>Geeetech CY7C68013, front</small>
It is possible to flash fx2lafw directly to the EEPROM on the board. Flashing a firmware to ram and renumerating takes about two seconds. If fx2lafw boots from the EEPROM, this step is no longer necessary.
File:Geeetech_CY7C68013_back.jpg|<small>Geeetech CY7C68013, back</small>
</gallery>


=== Prerequisites ===
Differences from the LCSoft board:
* Linux environment
* two LEDs, on pins PA0 and PA1
* [http://sourceforge.net/projects/linux-hotplug/files/fxload/2008_10_13/ fxload]: your distribution may already package this. These instructions assume that you have fxload running.
* two jumpers: J1 connects/disconnects the LEDs from Vcc, J2 sets the EEPROM address bit A0
* [http://www.triplespark.net/elec/periph/USB-FX2/eeprom/fxload-full-2008_10_13-ww3.tar.gz Second stage bootloader, Vend_Ax.hex]
* construction quality is higher
* sigrok-firmware-fx2lafw sources.


=== Building the firmware ===
The Geeetech board's J2 is logically opposite to the LCSoft board's jumper: pin A0 is tied HIGH via a 10kOhm resistor, inserting J2 pulls it LOW. i.e. inserting J2 on the Geeetech is functionally the same as removing the jumper on the LCSoft board.
To flash the firmware, you will need a hex file containing the firmware, fx2lafw-cypress-fx2.ihx. Since the hex file is a byproduct of the build, you will need to build the firmware from sigrok-firmware-fx2lafw sources.


1) Build and install fx2lafw. See [[fx2lafw#Build_fx2lafw]] for details.
== Protocol ==


=== Testing the firmware ===
Since we use the open-source [[fx2lafw]] firmware for this device, we don't need to know the protocol.
2) Ensure you can access the USB device. One method is to run the following commands as root. A more elegant method is to use udev. See [[fx2lafw#Install_the_udev_rules_file]] for details.


3) Disconnect the EEPROM jumper. The chip will boot from its default bootloader.
== Possible issues ==
 
4) Connect the board to the computer, and run a simple sigrok-cli test.
$ sigrok-cli --driver=fx2lafw --samples=8 -O bits -l 5
* If you a "fx2lafw: Device came back after [some] ms." the firmware works, and you can proceed.
* If however, you get a "fx2lafw: Device failed to renumerate." error, STOP. The firmware will not work.
 
=== Flashing the firmware ===
5) Disconnect the board from the PC, and connect the EEPROM jumper. The board needs to boot from the EEPROM, otherwise fxload will not be able to write to the EEPROM.
 
6) Look at '''lsusb''' for the bus and device address.
$ lsusb
[...]
Bus 009 Device 078: ID 0925:3881 Lakeview Research
[...]
 
In this case, the bus is '''009''' and device is '''078'''. You will need this information later.
 
7) Copy the hex file to your working directory. You will find it in '''sigrok-firmware-fx2lafw/hw/cypress-fx2/build/fx2lafw-cypress-fx2.ihx'''.
 
8) Copy the second stage bootloader downloaded earlier, in the working directory. The file is named '''Vend_Ax.hex'''.
 
9) Invoke fxload:
fxload must be passed the usb device path via the -D parameter. This is usualy:
/dev/bus/usb/'''[bus]'''/'''[device]'''
or
/proc/bus/usb/'''[bus]'''/'''[device]'''
 
* The '''-I''' parameter specifies the hex file to be flashed, in our case fx2lafw-cypress-fx2.ihx.
* '''-s''' specifies the second stage bootloader. This is the program that gets loaded into FX2's RAM and handles the EEPROM flashing process.
* '''-t''' specifies the chip type. It will either be fc2 or fx2lp. In this case, I was using the fx2 (not fx2lp).
 
Invoke fxload. In my case, I needed to invoke as such:
$ fxload -D /dev/bus/usb/009/078 -I fx2lafw-cypress-fx2.ihx -c 0x01 -s Vend_Ax.hex -t fx2
 
10) DONE. Now you can disconnect the board from the computer. Leave the EEPROM jumper connected. The next time you connect the board, it will boot fx2lafw directly, and sigrok will not need to upload the firmware every time it runs.
 
== Possible Issues ==


* With some kernel versions, and if the onboard EEPROM is disconnected (the jumper not connected) the kernel will automatically claim the device with a '''usbtest''' kernel module, seen in dmesg like '''usbtest 2-2:1.0: FX2 device''' &mdash; if this happens, sigrok will be unable to claim the device. Remove the '''usbtest''' kernel module as root to be able to use it:
* With some kernel versions, and if the onboard EEPROM is disconnected (the jumper not connected) the kernel will automatically claim the device with a '''usbtest''' kernel module, seen in dmesg like '''usbtest 2-2:1.0: FX2 device''' &mdash; if this happens, sigrok will be unable to claim the device. Remove the '''usbtest''' kernel module as root to be able to use it:
Line 112: Line 83:
  $ '''sudo sh -c "echo 'blacklist usbtest' >> /etc/modprobe.d/blacklist.conf"'''
  $ '''sudo sh -c "echo 'blacklist usbtest' >> /etc/modprobe.d/blacklist.conf"'''


== Required Testing Hardware Extensions ==
== Required testing hardware extensions ==


'''Do not directly hook the board pins to another circuit, if you don't know what you are doing! This could damage the board!'''
'''Do not directly hook the board pins to another circuit, if you don't know what you are doing! This could damage the board!'''


The simplest circuit would be adding at least resistors in between your circuit-in-test and the Lcsoft board, but be aware here that the Cypress FX2(LP) chip can only tolerate a maximum of 5V I/O. Better would be to use a clamp circuit like shown at [http://sunbizhosting.co.uk/~spiral/blog/?p=117 Spiralbrain's Blog] (but you do not need to add another EEPROM for sigrok with [[fx2lafw]]!). A buffer circuit using a 74HC241 IC for protection is also possible. Check the [[fx2lafw]] page to see which protection circuits are used on other logic analyzer boards.
The simplest circuit would be adding at least resistors in between your circuit-in-test and the Lcsoft board, but be aware here that the Cypress FX2(LP) chip can only tolerate a maximum of 5V I/O. Better would be to use a clamp circuit like shown at [http://web.archive.org/web/20140604115345/http://sunbizhosting.co.uk/~spiral/blog/?p=117 Spiralbrain's Blog] (but you do not need to add another EEPROM for sigrok with [[fx2lafw]]!) (and this clamp circuit does not protect the chip from voltages < -0.5 V). A buffer circuit using a 74HC241 IC¹ for protection is also possible. Check the [[fx2lafw]] page to see which protection circuits are used on other logic analyzer boards.


More information can be found in [[Circuits for barebone boards]].
More information can be found in [[Circuits for barebone boards]].
Line 122: Line 93:
== Resources ==
== Resources ==


* [http://sunbizhosting.co.uk/~spiral/blog/?p=117 Spiralbrain's blog: So your Saleae clone isn’t working with the new software?]
* [http://web.archive.org/web/20140604115345/http://sunbizhosting.co.uk/~spiral/blog/?p=117 Spiralbrain's blog: So your Saleae clone isn’t working with the new software?]
* [http://hanixdiy.blogspot.de/2011/03/cy7c68013a-usb-logic-analyzer.html hAnix-diy: CY7C68013A USB Logic Analyzer]
* [http://hanixdiy.blogspot.de/2011/03/cy7c68013a-usb-logic-analyzer.html hAnix-diy: CY7C68013A USB Logic Analyzer]
* [http://www.triplespark.net/elec/periph/USB-FX2/eeprom/ Instructions for flashing the EEPROM on FX2 devices]
* [http://www.triplespark.net/elec/periph/USB-FX2/eeprom/ Instructions for flashing the EEPROM on FX2 devices]
* [http://www.triplespark.net/elec/periph/USB-FX2/eeprom/fxload-full-2008_10_13-ww3.tar.gz Second stage bootloader, Vend_Ax.hex]
* [http://www.triplespark.net/elec/periph/USB-FX2/eeprom/fxload-full-2008_10_13-ww3.tar.gz Second stage bootloader, Vend_Ax.hex]
¹) with Vcc=2.8 V you get approx. VIL<=0.77 V and VIH>=2.03 V; with Vcc=5.0 V you get approx. VIL<=1.5 V and VIH>=3.5 V (interpolated from datasheet)


[[Category:Device]]
[[Category:Device]]
[[Category:Logic analyzer]]
[[Category:Logic analyzer]]
[[Category:Supported]]
[[Category:Supported]]

Latest revision as of 22:55, 26 January 2019

Lcsoft Mini Board
Lcsoft-miniboard-front.png
Status supported
Source code fx2lafw
Channels 8/16
Samplerate 24MHz
Samplerate (state)
Triggers none (SW-only)
Min/max voltage -0.5V — 5.25V
Threshold voltage Fixed: VIH=2.0V—5.25V, VIL=-0.5V—0.8V
Memory none
Compression none
Website lctech-inc.com, geeetech.com

The Lcsoft CY7C68013A Mini Board is a Cypress FX2(LP) eval board, which can be used as USB-based, 16-channel logic analyzer with up to 24MHz sampling rate.

It is a clone of the Saleae Logic.

In sigrok, we use the open-source fx2lafw firmware for this logic analyzer.

See Lcsoft Mini Board/Info for some more details (such as lsusb -v output) on the device.

There is a very similar board made by Geeetech, it has near-identical components but a slightly different layout.

Hardware

  • Main chip: Cypress CY7C68013A-56PVXC (FX2LP)
  • 3.3V voltage regulator: Advanced Monolithic Systems AMS1117-3.3
  • 16kB I2C EEPROM: Atmel AT24C128A
  • 24MHz crystal: JY24.0000601

All the pins on the FX2(LP) are broken out to 40 header pins. There's an on/off toggle switch, a reset button, and a jumper that lets you select whether the FX2LP gets its configuration from a small EEPROM, or boots into the default mode. The EEPROM is usually provided programmed such that it enumerates with the same VID:PID as a Saleae Logic.

By default the chip will boot in some internal bootloader which allows loading (and executing) from USB to the internal RAM. Sigrok will typically use the fx2lafw firmware for this (aka "load-on-probe").

The EEPROM can be programmed with a firmware. The jumper allows to select whether the chip will boot on the EEPROM or the usual load-on-probe. This can be used for example to switch easily between a 16-channel (PB0-PB7, PD0-PD7) firmware and a 8-channel (PB0-PB7) one.

The Cypress has no DAC and can't by itself have any analog output. Other Cypress-based board have an external DAC, typically connected to 8 pins of the FX2, but this very one doesn't have any DAC.


Photos

Geeetech version:

Geeetech product page

Differences from the LCSoft board:

  • two LEDs, on pins PA0 and PA1
  • two jumpers: J1 connects/disconnects the LEDs from Vcc, J2 sets the EEPROM address bit A0
  • construction quality is higher

The Geeetech board's J2 is logically opposite to the LCSoft board's jumper: pin A0 is tied HIGH via a 10kOhm resistor, inserting J2 pulls it LOW. i.e. inserting J2 on the Geeetech is functionally the same as removing the jumper on the LCSoft board.

Protocol

Since we use the open-source fx2lafw firmware for this device, we don't need to know the protocol.

Possible issues

  • With some kernel versions, and if the onboard EEPROM is disconnected (the jumper not connected) the kernel will automatically claim the device with a usbtest kernel module, seen in dmesg like usbtest 2-2:1.0: FX2 device — if this happens, sigrok will be unable to claim the device. Remove the usbtest kernel module as root to be able to use it:
$ sudo rmmod usbtest

You can add the usbtest module to a module blacklist permanently, at least in Debian-based distributions found in /etc/modprobe.d/blacklist.conf:

$ sudo sh -c "echo 'blacklist usbtest' >> /etc/modprobe.d/blacklist.conf"

Required testing hardware extensions

Do not directly hook the board pins to another circuit, if you don't know what you are doing! This could damage the board!

The simplest circuit would be adding at least resistors in between your circuit-in-test and the Lcsoft board, but be aware here that the Cypress FX2(LP) chip can only tolerate a maximum of 5V I/O. Better would be to use a clamp circuit like shown at Spiralbrain's Blog (but you do not need to add another EEPROM for sigrok with fx2lafw!) (and this clamp circuit does not protect the chip from voltages < -0.5 V). A buffer circuit using a 74HC241 IC¹ for protection is also possible. Check the fx2lafw page to see which protection circuits are used on other logic analyzer boards.

More information can be found in Circuits for barebone boards.

Resources

¹) with Vcc=2.8 V you get approx. VIL<=0.77 V and VIH>=2.03 V; with Vcc=5.0 V you get approx. VIL<=1.5 V and VIH>=3.5 V (interpolated from datasheet)