This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530 & Assembly language programming

Other Parts Discussed in Thread: CC2530, SIMPLICITI

Hi Y'all

You might consider this a strange request but,...

Does anyone have experience of programming for CC2530 in assembly language ?

---------------

I'm developing a project using 2 (or maybe later 3) cc2530s

Simple remote sensor / data logger application

Sensor - RF Transceiver (with LED indication of successful link) ----------- RF Transceiver - Memory, Real time clock, RS232 interface (for logged data download)

 

Sensor with serial data connection, (could be one of several sensors, this one is logic level RS232, others may be SPI or I2C). >>

cc2530  to give  2.4GHz radio link with pre-defined addresses (pre-matched pair of transceivers) (Similar  to or same as simplicTI using smpl_Commission() )

 

Logger with cc2530,  RTC, memory & RS232

-----------------------

my problem is that despite (or because of ?) 20+ years of experience of assembly language programming on 8051 based microcontrollers (including other 8051 based radio transceivers) and reasonable experience with C51 (keil) compiler, I just cannot get on with the IAR compiler & the TI simplicity code. (it just seems so unnecessarily complicated)

All that I want to achieve would be so simple to implement in assembly language, except control of the radio, which from the cc2530 data sheet does seem quite complex.

so does anyone have experience of controlling the radio side of the cc2530 in assembly code & is it really that difficult

as I mentioned above, all I want to achieve is something like the simpliciTI smpl_Commission() protocol, with a programmable channel (RF frequency), a fixed but programmable address for the transmitted message, & about 10 bytes of data,  transmitted and received with an acknowledge

In hindsight, maybe some other chipset (like Nordic Semi's nRF24LE1, which I've used before, in assembly language, easilly) would have been a better choice, but I'm too far committed to the cc2530 to change now

 

Any constructive advice or ideas welcomed

TIA

 

 

 

  • It's actually pretty difficult to do it in C, even just trying to control the radio side directly. If you want to make things simpler, then use a module.

     

    Regards,

    Derek

  • Yes, moving from assembly to a higher level language can seem overly complex but there are also justifiable reasons for doing so.

    I would suggest the following...

    1. Download SimpliciTI and open any one of the projects for the CC2530 part.
    2. Turn on the option to keep the generated assembly files.
    3. Turn on the options to interlist the C code in as comments with the assembly
    4. Compile the project
    5. Open the associated assembly file for the mrfi.c file (most likely mrfi.r51).
    6. Find the function for MRFI_Transmit and the Receive ISR
    7. Modify this code to suit your particular needs.

    The above procedure should get you the main operations you require for communication between a couple of radios.  From there, you can strip some of the code to make suitable macros and change some of the compile constants to identifiers so the code is a bit more readable.  Also, you can see all the inefficiencies of the compiler and tighten up the code.

    Good luck,

    Jim Noxon

  • Another possibility is to start with a simpler code set than SimpliciTI such as, for example, the CC2530 code examples:  http://www.ti.com/litv/zip/swrc135b.

  •  

    Thanks for the advice Jim,

    I'd already started with SimpliciTI & got bogged down, so had stated looking through the generated assembler listing.

    Thankfully the CC2530 User Guide is well written & easy to follow so I've managed to get part way so far & am running the transmitter side in assembler & testing with a SimpliciTI based receiver.

    Hope to have it all running soon

    Cheers,... Phil

     

  • Thanks for that Grant, 

    wish I'd seen those code examples before I started with SimpliciTI, it might have made life easier

    Anyway I've still a way to go so hopefully I'll be able to find some help in those examples

     

    Thanks again

    ... Phil

     

     

     

  • Hello

    I want to program CC2530 in assembly language. i have my semester project to transmit the 1 byte data using RF between two CC2530 units. i will attach LEDS to show that transmitted data. please refer some easy to understand assembly guideline and basic settings for this simple communications.

    thanks in advance 

    Adil Ahmed

    BE Electronics

  • How to program the CC2530 in Assembly. It's simple: don't. Programming the thing in C is hard enough; trying to program it in assembly is like pounding in nails with your forehead.