Reply
Posts: 33
Registered: ‎03-06-2017

Reading Data from Laser Bee to PC

Hi,

      I need to store ADC data on a Laser Bee MCU or an external EEPROM chip and then later read/transmit that data to a PC. I was hoping to use the USB 8-bit debugger. Would this be possible? If it won't work with the debugger is there another way? Thanks!

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,185
Registered: ‎04-27-2004

Re: Reading Data from Laser Bee to PC


      I need to store ADC data on a Laser Bee MCU or an external EEPROM chip and then later read/transmit that data to a PC. I was hoping to use the USB 8-bit debugger. Would this be possible? If it won't work with the debugger is there another way? Thanks!



Depends what you mean by USB 8-bit debugger.

If you mean the EFM8LB1 STK development board (PCB5300-) , with the Segger Debugger then yes, that has a COM port included that connects to the EFM8LB1, and will appear as COMx when you plug in the STK.

 

Under device manager it shows as JLink CDC UART Port

You can talk to that at 115200, using any serial port software, to read out the stored data, with the right code at each end.

Posts: 33
Registered: ‎03-06-2017

Re: Reading Data from Laser Bee to PC

Thanks for your reply. No, I'm not referring to the development board. For my eventual application the MCU will be on a custom PCB board. I was hoping to use something like this debugger:

 

http://www.silabs.com/products/development-tools/mcu/8-bit/8bit-mcu-accessories/8-bit-debug-adapter

 

If that won't work is the only other way to use some kind of USB interface? Thanks!

Posts: 2,384
Registered: ‎10-14-2014

Re: Reading Data from Laser Bee to PC

The UDA (USB to Silabs propertied C2 interface) is used to debug Silabs 8 bit MCU, usually it don't use as a general communication purpose like Silabs CP210x USB-UART product.
I am still confused on the request
1. where you will store the data? EFM8LB MCU or EEPROM
2. do you need EFM8LB to capture the ADC data?
3. what interface you intend to use between the PC and EFM8LB MCU for communication. i think you could try UART interface if your PC has US232 port (or add an USB to UART device if there is no US232 port oyour PC).
another option maybe choose our EFM8UB device that integrated with USB peripheral.

My views are my own and do not necessarily represent the views of Silicon Labs
WeiguoLu
Posts: 33
Registered: ‎03-06-2017

Re: Reading Data from Laser Bee to PC

Thanks for your response. My answers to your question are below:

 

1. where you will store the data? EFM8LB MCU or EEPROM

-Right now I'm at the beginning stages of my design. I could store data (1) using the EFM8LB RAM (2) an external EEPROM with either an I2C or SPI interface (after first storing data in RAM) or (3) using an EEPROM software immitator on the EFM8LB (I wasn't sure if this is possible from the application note). Basically, I need the data to persist if the device loses power, which is why I'm trying to use something besides RAM.


2. do you need EFM8LB to capture the ADC data?

-Yes, I need the EFM8LB to capture ADC data and I'm specifically interested in this MCU because it has up to a 900 KHz sampling rate, which is important for my application.


3. what interface you intend to use between the PC and EFM8LB MCU for communication. i think you could try UART interface if your PC has US232 port (or add an USB to UART device if there is no US232 port oyour PC). another option maybe choose our EFM8UB device that integrated with USB peripheral.

-I was hoping to try to use the 8-bit MCU debugger to read memory locations on the MCU, but this may not be possible. The EFM8UB may work OK, but I would prefer to try and get the EFM8LB to work because of the higher sampling rate. I guess the best option may be to try and get the EFM8LB to talk to my laptop using the UART interface?

 

I would appreciate any suggestions! Thank you!

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,185
Registered: ‎04-27-2004

Re: Reading Data from Laser Bee to PC


-Right now I'm at the beginning stages of my design. I could store data (1) using the EFM8LB RAM (2) an external EEPROM with either an I2C or SPI interface (after first storing data in RAM) or (3) using an EEPROM software immitator on the EFM8LB (I wasn't sure if this is possible from the application note).


At this stage you need to define how much storage you need, and at what sustained rate.

On-chip Flash is simplest, but of course has a finite size.

SPI FLASH likely gives you the cheapest storage per bit, and you would page buffer in the LB1 RAM.

There will be some limit on write speed.

FRAM is another option, if you need highest endurance and very little write delay.

 

 

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,185
Registered: ‎04-27-2004

Re: Reading Data from Laser Bee to PC

[ Edited ]

-Yes, I need the EFM8LB to capture ADC data and I'm specifically interested in this MCU because it has up to a 900 KHz sampling rate, which is important for my application.


-I was hoping to try to use the 8-bit MCU debugger to read memory locations on the MCU, but this may not be possible.


The debugger can read Flash and RAM, but not very quickly, and it cannot easily read external memory.

 

A sustained 900ksps is tough to keep up with.

Checking a standard flash, it specs Typical Page pgm of 700us/256 bytes which is

700/256 = 2.734us/Byte, rather lower than your target.

You may need FRAM/MRAM or battery backed RAM, if you want storage rates sustained at 900ksps.

 

I see the new HyperFLASH specs typical of 475us for 512B, so that manages 1MB/s write average.  

 

How much  storage do you need ?


 I guess the best option may be to try and get the EFM8LB to talk to my laptop using the UART interface?


Yes, 900ksps is going to be close to 2MBytes/s, which is pushing any UART.

If you hope to run the PC link at close to this  speed, I'd suggest something like a FT2232H.

The EFM8LB1 can probably send ok (with care) at the 12MBd ceiling of the FT2232H, but even that is ~600ksps.

 

Posts: 33
Registered: ‎03-06-2017

Re: Reading Data from Laser Bee to PC

Thanks for your response. I have the storage needs defined adequately for now. I just need to figure out how I can READ the data once it is stored/the MCU is soldered onto PCB board (i.e., separate from the development kit). Is there a standard way to do this? Size is critical to my application so I'm hoping not to have to add a bunch of additional external components. But, I do need to transmit the data to a PC. Thanks

Posts: 33
Registered: ‎03-06-2017

Re: Reading Data from Laser Bee to PC

Sorry, I think I was unclear in my previous post. 900 KHz is not the data read speed from the MCU it is the sampling rate from the ADC. I was hoping to run the ADC at a 500-900 ksps rate, store the data to the MCU in such a way that it will persist if the device loses power and then read the data to a PC at a later time. The read speed to the PC is not critical. I only need to read up to 4000 datapoint so 1 KHz read speed would be fine. Thanks!

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,185
Registered: ‎04-27-2004

Re: Reading Data from Laser Bee to PC

[ Edited ]

... I was hoping to run the ADC at a 500-900 ksps rate, store the data to the MCU in such a way that it will persist if the device loses power and then read the data to a PC at a later time. The read speed to the PC is not critical. I only need to read up to 4000 datapoint so 1 KHz read speed would be fine. 

That 500~900ksps is still going to challenge storage. (Too fast for Flash/EEPROM)

 

If the data points are modest, (4000 is not many, but too much for on-chip RAM), another approach would be to stream into SPI RAM/NVRAM/FRAM/MRAM and then copy the RAM into EFM8LB1 Flash at a lower speed.  (32kBytes of SPI SRAM is ~ $1 in moderate volumes, 128kBytes is ~ $2)

Then, you can send Flash to PC later.

 


I just need to figure out how I can READ the data once it is stored/the MCU is soldered onto PCB board (i.e., separate from the development kit). Is there a standard way to do this? Size is critical to my application so I'm hoping not to have to add a bunch of additional external components. But, I do need to transmit the data to a PC. 


Depends on what pins you have access to, connectors etc.

If you want absolute minimal connections, and you already allow for Debug/pgm connect in an end-user manner, then you could either use that to read the flash, or craft a half duplex serial interface using that C2D pin.

 

Almost any USB-Serial bridge device would be able to do that modest read speed, you would just need to merge TX/RX for the one-pin minimal case.

There is CP2102N-MINI for example, a low cost USB-UART module, or  FTDI have some moulded cable versions, if end-user presentation matters more to you.

 

http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm

 

Or, you can mount a 3mm  CP2102N-A01-GQFN20 onto your board, if you already have a USB connector for power.

 

 

 

 

Posts: 3,153
Registered: ‎02-07-2002

Re: Reading Data from Laser Bee to PC

[ Edited ]

How many bits per sample do you intend to store? Along with the samplerate and the number of samples, first decide how and where you will store this data. As jmg says, this is not trivial to begin with.

 

After that decide what kind of connector you intend to use for programming and debugging. The C2 interface only requires 3 pins. You could add 2 pins for Rx/Tx. But beware that when left unprotected these pins could destroy the MCU with ESD. And you would need an external USB-UART converter like on the CP210x/EFM8STK/FTDI. This is ok for occasional use in a lab setup, but unfit for consumer use.

 

Don't you have room for a (vertical?) micro-USB connector and a small 3x3mm CP210x?

Posts: 8,176
Registered: ‎08-13-2003

Re: Reading Data from Laser Bee to PC

the REAL question here is: "did you choose the wrong device".

there are several '51s that have USB and ADC

erik
Posts: 33
Registered: ‎03-06-2017

Re: Reading Data from Laser Bee to PC

Yes, I'm working on deciding about the best configuration to store that data. I will store ideally 8-bits per data point, but I may be able to get away with less (I need to collect some initial data to finalize this decision). I could potentially include a micro/mini USB connect along with a USB chip, but it may be simpler for laboratory applciations if I could simply read the data using the debugger/programming interface. Thanks

Posts: 33
Registered: ‎03-06-2017

Re: Reading Data from Laser Bee to PC

It is possible that I need to switch devices, but I have several tradeoffs to consider including overall footprint of the electronics (including MCU) and the sampling speed I need for my application. As well as the other peripherals available. The Laser Bee seemed to give the best balance of everything for my needs compared to the other 51's. Is there a specific part that you had in mind? Thanks

Posts: 3,153
Registered: ‎02-07-2002

Re: Reading Data from Laser Bee to PC

[ Edited ]

You cannot use the debugging/programming interface to read from an external memory. And you cannot store the samples in internal RAM or internal flash.

 

No wait. If you only store 8 bit per sample and only need to store 4000 samples, you might be able to squeeze it into the 4kB XRAM of an EFM8LB12F64E. After the sampling is done, you could write it to internal flash which can be read out through the C2 interface.

Posts: 8,176
Registered: ‎08-13-2003

Re: Reading Data from Laser Bee to PC

footprint and the sampling speed I need for my application. As well as the other peripherals available.

Is there a specific part that you had in mind? Thanks

 

you need to list all if you want a device recommendation

erik
Posts: 4
Registered: ‎03-10-2017

Re: Reading Data from Laser Bee to PC

EFM8LB1 STK development board (PCB5300-)has a COM port included that connects to the EFM8LB1, and will appear as COMx when you plug in the STK.

Highlighted
Posts: 344
Registered: ‎09-22-2009

Re: Reading Data from Laser Bee to PC

That COM port you refer to is created by the debugger chip on that board. If you want to have your own board connect as a COM port, you will need to implement either USB on your EFM8LB1 or add a separate UART to USB bridge device such as a CP2102N.