2016年5月11日 星期三

CC2640 VS CC2540 VS CC2650

from https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/p/417820/1486886#1486886

cc2640 vs cc2541 differences

13885

kazola
Good afternoon!
I want to decide between the CC2640 and the cc2541. Because of this, I would like your opinion on several subjects :)
  1. Where do the power savings in RF come from? In other words, why does cc2541 require so much power compared to cc2640?
  2. How is it possible having 2 ARM in cc2640 consumes a similar value than 8051-based cc2541? I'm not an architecture guy so be kind here ;)
  3. I guess the change to simpleLink came from the need for more memory to fulfill v4.1 and v4.2 features and requirements. I heard cc2640 handles most of v4.1 and it will be able to manage v4.2. What about cc2541 for these two versions?
  4. How many BLE devices may handle the cc2640? There was a limit of.... 3 (AFAIR) in cc2541?
  5. Does the RTOS in cc2640 provide a huge difference in application performance? :) I'm more interested in your subjective opinion here, the "feeling" you have when debugging and running your applications.
  6. Which is the future of cc2541 at TI? In other words, should we discard this chip for new designs? I guess I will be able to extract this information from your previous answers but let me know them explicitly ;)
  7. I'm also interested in any additional thought and/or opinion and/or interesting issue I have not asked about and you may tell me! :)
Well, have the nicest day! :)
1) Basically because the radio is totally redesigned. 
2) This is just because the modern ARM processors are more efficient than the old 8051. Additionally we are using new production process, new technology, etc. Adding a built-in DCDC regulator also increases efficiency. Keep in mind though, that none of the numbers in the datasheet are for running both cores simultaneously. 
3) You are correct on CC2640. CC2541 will not be able to fulfill all of 4.1 due to RAM limitations.
4) Our current number is 8
5) Everything is faster in the CC2640 compared to the CC2541. Really.
6) The CC2541 will still be supported by us. We also plan to update the BLE stack for CC254x to 1.4.1 this year. It you prefer a device that have been in the market for several years and is mature, and you can live with the current consumption and the 8051 core, the CC2541 is still a good part to use.
7) You can get the CC26xx SensorTag for $29 with a low cost debugger for just additional $15. Get a kit and check it out!

Cheers,
Fredrik

http://processors.wiki.ti.com/index.php/CC26xx_FAQ

  • The multi-standard CC2650 wireless MCU supports BLE as well as other wireless protocols, such as 802.15.4. The CC2640 supports Bluetooth Low Energy only. 
  • The CC2640 & BLE-Stack v2.0.0 supports BT4.1. At this time, TI has not made any announcements regarding CC2640 support or capability of BT specifications beyond BT4.1. 

2016年4月20日 星期三

Ultrasound Study

1. How Ultrasound Works (1:40)
    https://www.youtube.com/watch?v=I1Bdp2tMFsY

2. Ultrasound Podcast - Physics Basics
    https://www.youtube.com/watch?v=HcQ3SHPgHbY&ebc=ANyPxKqhti7EgbbtYiC8SfKoZ4AFq6268OdidcYp070sGkHf0uPApYcU4qXerblF4t85DHlAN0Jciy8X0R86piQegNDaYjpeLA

3. Basics of ultrasound machine
https://www.youtube.com/watch?v=JqVGgq5bE-Y

2016年4月19日 星期二

power generator - Chinese

http://www.materialsnet.com.tw/DocPrint.aspx?id=7338

【主要技术参数】
(一)电气参数:(灯来后摇动一分钟)
1.
充电电池规格镍氢3.6V,40mAh;
2.
线圈最高输出电压5~6V;
3.
最高贮存电压4.5V;
4.
最大工作电流:20-30mA;
5.
最高亮度:≥45000~60000MCD;
6.
光亮时间:≥30分钟;(单灯30分;三灯约20分钟)
from http://www.wjw.cn/product/mbr060918193230163980/pro070302133723118655.xhtml
A mechanically powered flashlight. This uses a linear generator and is charged by shaking along its long axis.

2016年4月7日 星期四

General USB Device Classes


IAR and CCS are both available in free, code-size-limited versions (8K and 16K, respectively, of object code). Simple applications having no MSC interface can be run on both free versions. Applications having an MSC interface (and thus a larger application to implement the storage volume) generally don’t fit under 8K; for this reason, the free IAR Kickstart won’t build them. Instead, the free version of CCS can be used, or a licensed version of either environment.

The API is the foundation of the MSP430 USB Developers Package. It supports three of the most common USB device classes: • Communications Device Class (CDC): (ACM class) Results in a virtual COM port on the host • Human Interface Device class (HID): The MSP430 USB Developers Package defines four subtypes: – Datapipe (an unformatted general-purpose interface resembling CDC) – Mouse – Keyboard – Custom • Mass Storage Class (MSC): When the host sees an MSC interface, it begins mounting a storage volume from it.
  • ...The MSP430 MSC device, when attached to a USB host, displays as a storage volume on the operating system. The MSC protocol receives and executes SCSI commands from the host and uses the SCSI transparent command set for its use. All handling of SCSI commands is performed automatically by the MSP430 USB API stack with some support by the application.
  • A primary purpose of the MSC protocol is to receive and execute SCSI commands from the host. SCSI (Small Computer System Interface, pronounced “scuzzy”) is a set of specifications covering various levels of protocol, including a physical cable interface. One of the SCSI command sets – the SCSI transparent command set – has been adopted for use with the MSC protocol. This is the command set supported by this API.
  • When the host sends a SCSI command over the MSC protocol, it designates the LUN for which the command is intended. If the command reads/writes data, it also includes the LBA being accessed and the number of sequential blocks requested. Since the API must rely on the application to make the file system access calls when a SCSI read or write command is received, the API makes the SCSI command’s LUN, initial LBA, and number of requested blocks available to the application. Only one SCSI command at a time can be handled by an MSC interface. This means that if a command is received for LUN 0, it must be handled in full before a command can be received for LUN 1. For this reason, only a single interchange buffer is needed for the interface (or two, if double-buffering is used). (The current API version only supports single-buffering.) 
  • The MSC API automatically handles all SCSI commands required to function with the target host operating systems, based on information it receives from the application. The list of SCSI commands includes: • INQUIRY • REQUEST SENSE • TEST UNIT READY • READ • WRITE • READ CAPACITY • MODE SENSE • REPORT LUNS 
  • http://uglyduck.ath.cx/PDF/TexasInstruments/MSP430/usblib430/Programmers_Guide_MSP430_USB_API.pdf
  • Every USB application with an MSC interface must call this function regularly to check for any SCSI commands received from the host. The USB MSC interface is essentially a carrier for the same SCSI commands used with many non-USB storage devices that are commonly used with computers. In other words, the interface is essentially "SCSI-over-USB".
  • http://datasheet.octopart.com/MSP-EXP430F5529LP-Texas-Instruments-datasheet-17794772.pdf
  • SCSI

    Hard drives, flash drives, and other USB mass-storage devices support commands in the SCSI Primary Command (SPC) Set and SCSI Block Command (SBC) Set fromwww.t10.org (INCITS Technical Committee T10).
  •  http://pollos-blog.blogspot.tw/2014/10/usb-mass-storage-class.html --> Command structure

2016年3月28日 星期一

2016年3月15日 星期二

BLE UUID 128-bit and 16-bit

Use 128-bit UUID to find service

// BLE Base 128-bit UUID: 0000XXXX-0000-1000-8000-00805F9B34FB
// TI Base 128-bit UUID: F000XXXX-0451-4000-B000-000000000000
#define BLE_BASE_UUID_128( uuid )  0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, \
                                  0x00, 0x10, 0x00, 0x00, LO_UINT16( uuid ), HI_UINT16( uuid ), 0x00, 0x00

uint8 uuid[ATT_UUID_SIZE] = { BLE_BASE_UUID_128( CURRENT_TIME_SERV_UUID ) };

        GATT_DiscPrimaryServiceByUUID( timeAppConnHandle, uuid,
                                       ATT_UUID_SIZE, timeAppTaskId );

reference:
CC2541连接ANCS服务
http://yangchong89.lofter.com/tag/cc2541


https://github.com/oroce/BLE-CC254x-1.4.0/blob/master/Projects/ble/OADManager/Source/oad_mgr_app.c

* @fn oadManagerSvcDiscovery
*
* @brief OAD Service discovery.
*
* @return none
*/
static void oadManagerSvcDiscovery(void)
{
uint8 oadServUUID[ATT_UUID_SIZE] = { TI_BASE_UUID_128( OAD_SERVICE_UUID ) };
// Initialize service discovery variables
oadSvcStartHdl = oadSvcEndHdl = 0;
if (GATT_DiscPrimaryServiceByUUID(oadManagerConnHandle, oadServUUID,
ATT_UUID_SIZE, oadManagerTaskId) != SUCCESS)
{
(void)osal_set_event(oadManagerTaskId, SVC_DISCOVERY_EVT);
}
}


/** * @brief This sub-procedure is used by a client to discover a specific * primary service on a server when only the Service UUID is * known. The primary specific service may exist multiple times * on a server. The primary service being discovered is identified * by the service UUID. * * The ATT Find By Type Value Request is used with the Attribute * Type parameter set to the UUID for "Primary Service" and the * Attribute Value set to the 16-bit Bluetooth UUID or 128-bit * UUID for the specific primary service. The Starting Handle shall * be set to 0x0001 and the Ending Handle shall be set to 0xFFFF. * * If the return status from this function is SUCCESS, the calling * application task will receive multiple OSAL GATT_MSG_EVENT messages. * The type of the messages will be either ATT_FIND_BY_TYPE_VALUE_RSP * or ATT_ERROR_RSP (if an error occurred on the server). * * Note: This sub-procedure is complete when either ATT_FIND_BY_TYPE_VALUE_RSP * (with bleProcedureComplete or bleTimeout status) or ATT_ERROR_RSP * (with SUCCESS status) is received by the calling application task. * * @param connHandle - connection to use * @param pUUID - pointer to service UUID to look for * @param len - length of value * @param taskId - task to be notified of response * * @return SUCCESS: Request was sent successfully.<BR> * INVALIDPARAMETER: Invalid connection handle or request field.<BR> * MSG_BUFFER_NOT_AVAIL: No HCI buffer is available.<BR> * bleNotConnected: Connection is down.<BR> * blePending: A response is pending with this server.<BR> * bleMemAllocError: Memory allocation error occurred.<BR> * bleTimeout: Previous transaction timed out.<BR> */ extern bStatus_t GATT_DiscPrimaryServiceByUUID( uint16 connHandle, uint8 *pUUID, uint8 len, uint8 taskId );

2016年2月17日 星期三

photocap

PhotoCap是一個影像處理軟體,由台灣程式設計師王俊昌所開發。這個軟體原先的開發動機單純只是要在數位相片上加上日期標記。演變至今已經變成一個非常好用的小型數位影像編修軟體。
個人、家庭或學校教育單位等非商業營利用途免費,商業用途每套一次收費新台幣500至2000元不等。
from wikipedia

最近剛好需要用到批次加日期於照片的功能, 下載之前就用過台灣人開發的軟體, 推薦給大家使用;