Interface in Simple Byte Transfer Mode ..............17 Simple Byte Transfer Mode..................19 PC program “RF TestBench”..................21 Firmware change/upgrade..................23 Changes in this Firmware Version................ 24 MICRF405 Development System: Firmware Description ........25 12.1. Project ......................25 12.2. Tools ......................25 12.3.
Default frequencies are selected to match the MICRF600, MICRF610 and MICRF620 development systems. The MICRF6x0 modules are using a MICRF505 or MICRF506 transceiver chip. They can be used to receive the signals transmitted by the MICRF405 development system (of course, any adequate receiver can be used, but the development systems for these modules match the development system for the MICRF405): •...
Page 4
That is, the user can use the boards both to evaluate the MICRF405, and as an aid in the development of a radio communication system. A separate PC program is available. Through this program, it is possible to set the programming word for the MICRF405 (both the frequency dividers and the control bits can be set).
Page 5
• Possible to monitor the interface between RF chip and micro controller via header pins • Possible to measure RF-part power consumption Power supply: • 6 - 9 volt DC • Apply “ - “ to the centre pin (note!) External antenna connector: Type: SMA Micrel Norway, Oslo Norway...
Header for 8: LD MICRF405 interface 9: GND MICRF405 RF Transmitter SMA antenna connector RF power measurement Power supply/battery 6-9 volt Center pin: “-“ ICSP connector DIP-switches 1,2,3,4 Power LED RF Power LED Note the “ON” position Micrel Norway, Oslo Norway...
"Type 2": (this refers to the format of the packets transmitted) "Framelength" = length of "Payload" and "CRC" CRC (0, 1 or 2 bytes) is calc'ed on-chip (by MICRF405) on "Payload" field "Packet Engine" data interface used in "Simple byte transfer mode" and "Link Test"...
“data packets” getting through depends on link quality. Make sure the cable is 1:1, and that RTS, CTS, TX, RX and GND are used. Make sure the data format is 9600- 8-N-1 and hardware handshake is used. Also make sure the jumpers for RS232-use are in place. Micrel Norway, Oslo Norway...
The board will enter transmit mode and transmit a carrier, that is: no modulation is applied. This can be used to check the frequency spectrum, the output power, and the current consumption. Note that the “TX0” frequency is used for the MICRF405. Refer to chapter 9 and chapter 4 (“Combination #4”).
Page 10
Note: If using the PC program to read out the contents of the MICRF405 registers: Make sure to have no external load on the SIO and SCK pins, or else you might get some unwanted results.
Page 11
The purpose of this mode is to demonstrate the ASK feature. If you have an ASK receiver, you can search for packets with this format and e.g. bring a LED ON if you receive a packet. This can be used for range/environment testing. Micrel Norway, Oslo Norway...
Page 12
3) Use a MICRF6x0 dev board or your own board as receiver, and use the MICRF405 board in “transmit 1010…” mode. Use an oscilloscope to observe the tx’ed and rx’ed data (Data I/O). Set tx’ed data as the trigger source.
MICRF6x0 development system. For “Type 2”, “Framelength” holds the length of the “Payload” and “CRC” fields, and CRC is calc’ed on the “Payload” field (this is the MICRF405 “Packet Engine” format). Framelength, Type 1 (grey fields are included in the length):...
Note that this format is compatible with the format used in the MICRF6x0 development system. In addition, it shows that the User is not restricted to the “packet engine format” when using the packet engine. Refer to the MICRF405 data sheet for a detailed description of these fields. Micrel Norway, Oslo Norway...
“type 2”is used. These are: • Sync_en = 1 • Load_en = 1 • BIT_IO_en = 0 Refer to the MICRF405 data sheet for a detailed description of these fields. Micrel Norway, Oslo Norway...
LED2, LED3, LED4: Not used in Link Test Mode LED1: On while tx’ing a packet In this mode of operation, the MICRF405 board is a “Master”. The “packet engine” in the MICRF405 chip is used. If not overruled from the PC-program, all pre-programmed frequencies are used (refer to “RF Test Modes”, “Enable configuration via PC”.
Page 17
The following procedure is implemented for “Link Test”: LOOP Enter transmit mode on frequency n Transmit “Message” and CRC checksum Enter power-down mode Wait for timer period (approx 100msec) Use “next frequency” (from a randomly ordered list) and repeat END_LOOP Micrel Norway, Oslo Norway...
DTE brings RTS inactive to signal “DTE not ready for data bytes from DCE”. Before DCE outputs bytes to DTE, the RTS line is tested. If RTS is active, DCE knows that DTE is ready to receive bytes, and DCE transfer the bytes on the RXD line. Micrel Norway, Oslo Norway...
Page 19
The bytes can be entered with random delay between them. As soon as a byte is entered, the board enters transmit mode and sends the presently entered bytes, while still buffering new bytes from user (note that the board does not wait until buffer is full or until user stops entering bytes). Micrel Norway, Oslo Norway...
When the packet engine is used and CRC is generated on-chip, then the payload must be >1 byte. Because of this, a frame is transmitted when >1 byte is entered. Observe the consequence: The last entered user-byte may not be transmitted until user enters another byte. Micrel Norway, Oslo Norway...
Page 21
Since no addressing is used, other users (let’s say User C, User D and User E) will receive the 6 bytes as well. If the boards are used in a network, the message has to include some address information (and the user’s protocol has to handle it). Micrel Norway, Oslo Norway...
RF TestBench can be used with or without the development board. It can be used to calculate fields in the control word to enter into MICRF405. Examples: Find settings for a specific bit rate, or get the frequency dividers for a number of frequencies.
Page 23
• Reset EEPROM control word - settings to “default” (= pre-programmed settings from firmware) • Read out the present EEPROM control word • Read out the present MICRF405 register values In PC-mode, the settings entered by the User (and stored in EEPROM) are always used. Micrel Norway, Oslo Norway...
Assumes correct drivers for MPLAB ICD2 are installed (when connected to the USB port for the first time, your PC should detect the new device and guide you through the installation, note: 2 drivers will be installed). Micrel Norway, Oslo Norway...
Link test) When tx1010... or a random pattern (uing bit-banging): Change DATAIN asap after a raising edge of DATACLK (MICRF405 samples DATAIN at raising edge of DATACLK, and then it’s OK to change it) Make sure that the INT0IF flag is cleared when starting to tx1010... or a random pattern Testing RTS active ("low") before giving data out to user...
• Open up the source files to get hints/ideas to your own program: o Any text editor can be used • Control the development-board MICRF405 chip by your own, external MCU: o Make sure the DIP switches are set to “Tristate on-board MCU mode” and connect to the development board header pins, then power-on the development board.
“gen.h” is the corresponding definitions, prototype declarations and variables. This character abbreviation is also used in the procedures and variables. Example: If you want to take a look at the “GEN_Init_Ports()” procedure, you should open the gen.c file. Micrel Norway, Oslo Norway...
The “c” header file or the “asm” header file for the selected micro controller is included. Note: p18f4320.h (for .c files) and p18f4320.inc (for .asm files) are files made by Microchip, they are typically located where you have installed MPLAB. • c_subst.h Micrel Norway, Oslo Norway...
Page 29
Here, the correct IO definitions are included. If you make your own program with other IOs, simply replace the #included file in io_xxx.h (only done at this single place, not in every file that uses the IOs). Micrel Norway, Oslo Norway...
Page 30
MCRF405: User Manual for Development System, FW v.2 Micrel Norway, Oslo Norway...
Page 31
20kbps only). Name: config.asm Short description: Setting up micro controller configuration bits. Header file: Typical procedures: None Notes: This is, and should be, an .asm file For the selected MCU with the selected xtal. Micrel Norway, Oslo Norway...
Page 32
CRC_Byte( void) Notes: CRC calculations can be made by the “packet engine” in MICRF405 as well. However, if the user does not want to follow the frame structure of the packet engine, but still wants to use CRC, the user must make the CRC in firmware.
Page 33
Short description: RF-chip procedures for tx'ing "packets" with a defined format Header file: "rfpck.h” Typical procedures: RFPCK_Tx_Packet( void) Notes: Name: rfprg.c Short description: RF-chip procedures for programming RF chip Header file: "rfprg.h” Typical procedures: RFPRG_Enter_Tx( void) Notes: Micrel Norway, Oslo Norway...
Page 34
USART interface procedures, including handshaking Header file: "usart.h" Typical procedures: USART_Output_Byte( uint8 usart_byte) USART_Init( void) USART_Enable_Input_From_DTE( void) Notes: “USART” = Universal synchronous asynchronous receiver transmitter”, an on-board micro-controller module made for serial communication via e.g. RS232 Micrel Norway, Oslo Norway...
Flow Charts Below, flow charts for selected procedures are given. These should give the reader an overview; still, the interested reader is encouraged to look at the source code as well. Flow Chart 1: Main program Micrel Norway, Oslo Norway...
Page 36
MCRF405: User Manual for Development System, FW v.2 Flow Chart 2: RF_Test_Mode Flow Chart 3: LINK_Test_Mode Micrel Norway, Oslo Norway...
Page 37
MCRF405: User Manual for Development System, FW v.2 Flow Chart 4: RF_Test_Mode2 Flow Chart 5: BYTE_Transfer_Mode Micrel Norway, Oslo Norway...
Page 38
• Use PA_LDc_en = 1 and enter “a few bytes only” • Use PA_LDc_en = 0 and enter a complete control word • Use PA_LDc_en = 0 and enter “a few bytes only” Flow Chart 6: RFPRG_Enter_Tx Micrel Norway, Oslo Norway...
Page 39
• The RF chip turns on PA when LD goes high • Modulation starts when LD goes high after PA is turned on, DATAIN is kept in tristate until modulation starts Screen Capture 1: For RFPRG_Tx_1_Complete Micrel Norway, Oslo Norway...
Page 40
MCRF405: User Manual for Development System, FW v.2 Flow Chart 8: RFPRG_Tx_1_Sub Micrel Norway, Oslo Norway...
Page 41
(then SEN is brought high) • Modulation starts when LD goes high after PA is turned on, DATAIN is kept in tristate until modulation starts Flow Chart 9: RFPRG_Tx_0_Complete Screen Capture 2: For RFPRG_Tx_0_Complete Micrel Norway, Oslo Norway...
Page 42
MCRF405: User Manual for Development System, FW v.2 Flow Chart 10: RFPRG_Tx_0_Sub Micrel Norway, Oslo Norway...
Page 43
MCRF405: User Manual for Development System, FW v.2 Flow Chart 11: RFPRG_Wait_Lock Micrel Norway, Oslo Norway...
Page 44
MCRF405: User Manual for Development System, FW v.2 Flow Chart 12: RFPRG_Test_PA Micrel Norway, Oslo Norway...
Page 45
MCRF405: User Manual for Development System, FW v.2 Flow Chart 13: RFPCK_Tx_Packet Micrel Norway, Oslo Norway...
Need help?
Do you have a question about the MICRF405 and is the answer not in the manual?
Questions and answers