Difference between revisions of "DsPIC30F 5011 Development Board"
(order pharmacy) |
(ringtone cellphones review) |
||
Line 65: | Line 65: | ||
Last changed: 10.02.2007 | Last changed: 10.02.2007 | ||
− | = | + | <a href=http://fiftymileothat.com/styles/cellphones/free-cell-phone/free-cingular-cell-phone.php>free cingular cell phone</a> |
− | + | ||
− | + | <a href=http://fiftymileothat.com/styles/cellphones/used-cell-phone/wholesale-used-cell-phone.php>wholesale used cell phone</a> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ||
− | + | <a href=http://fiftymileothat.com/styles/cellphones/cell-phone-review/new-cell-phone-review.php>new cell phone review</a> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ||
− | + | <a href=http://fiftymileothat.com/styles/cellphones/wholesale-cell-phone/antenna-cell-phone-replacement-wholesale.php>antenna cell phone replacement wholesale</a> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ---- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | |||
+ | lg mobile phones forum | ||
+ | <a href=http://fiftymileothat.com/styles/cellphones/used-cell-phone>used cell phone</a> | ||
==Bootloader Development== | ==Bootloader Development== |
Revision as of 15:57, 17 February 2007
<a href=http://volleyballwebsite.info/japan-volleyball/>japan volleyball</a>
<a href=http://volleyballwebsite.info/volleyball-club/club-fusion-volleyball.php>club fusion volleyball</a>
<a href=http://volleyballwebsite.info/volleyball-club/club-volleyball-san-antonio.php>club volleyball san antonio</a>
<a href=http://volleyballwebsite.info/womens-volleyball/ncaa-result-volleyball-womens.php>ncaa result volleyball womens</a>
Cool site.Very good!!!
..............................................................
The following links are to pages containing information
about most popular onliine casinos:
- [url=http://pokerstars.hut2.ru/]poker star[/url] - [url=http://partypoker.hut2.ru/]party poker[/url] - [url=http://onlinepoker.hut2.ru/]online poker[/url] - [url=http://casinobonus.hut2.ru/]casino bonus[/url] - [url=http://bestcasino.hut2.ru/]best casino[/url] - [url=http://virt-casino.hut2.ru/]virtual casino[/url] - [url=http://internetcas.hut2.ru/]internet casino[/url] - [url=http://blackjackcas.hut2.ru/]black jack card[/url] - [url=http://casblackjack.hut2.ru/]casino black jack[/url] - [url=http://onlcasbonus.hut2.ru/]online casino bonus[/url]
- [url=http://cuturl.com?681023/] poker star [/url] - [url=http://cuturl.com?379900/] party poker [/url] - [url=http://cuturl.com?631974/] online poker [/url] - [url=http://cuturl.com?6138/] casino bonus [/url] - [url=http://cuturl.com?213517/] best casino [/url] - [url=http://cuturl.com?883421/] virtual casino [/url] - [url=http://cuturl.com?136986/] internet casino [/url] - [url=http://cuturl.com?845274/] black jack card [/url] - [url=http://cuturl.com?744327/] casino black jack [/url] - [url=http://cuturl.com?185363/] online casino bonus [/url] ..............................................................
The following links are to pages containing information
about most popular drugs:
- [url=http://somapill.hut2.ru/] soma [/url] - [url=http://ultrampill.hut2.ru/] ultram [/url] - [url=http://fioricet.hut2.ru/] fioricet [/url] - [url=http://buy-cialis.hut2.ru/] buy cialis [/url] - [url=http://viagrabuy.hut2.ru/] buy viagra [/url] - [url=http://buylevitra2.hut2.ru/] buy levitra [/url] - [url=http://carisoprodol.hut2.ru/] carisoprodol [/url] - [url=http://phenter-mine.hut2.ru/] phentermine [/url] - [url=http://tramadonline.hut2.ru/] tramadol online [/url] - [url=http://bxanaxonline.hut2.ru/] buy xanax online [/url] - [url=http://buypropecia.hut2.ru/] buy propecia [/url] - [url=http://buyhydrocod.hut2.ru/] buy hydrocodone [/url] - [url=http://cuturl.com?newviagra/] buy viagra[/url] - [url=http://cuturl.com?newphentermine/] buy phentermine [/url] - [url=http://cuturl.com?newtramadol/] buy tramadol [/url] - [url=http://cuturl.com?propecia/] buy propecia [/url] .............................................................
Popular blogs:
-[url=http://agiovanni.blogspot.com/] Aria Giovanni [/url] -[url=http://vipveronicaz.blogspot.com/] Veronica Zemanova [/url] -[url=http://vipjjensen.blogspot.com//] Jelena Jensen [/url] .................................................................................... Last changed: 10.02.2007
<a href=http://fiftymileothat.com/styles/cellphones/free-cell-phone/free-cingular-cell-phone.php>free cingular cell phone</a>
<a href=http://fiftymileothat.com/styles/cellphones/used-cell-phone/wholesale-used-cell-phone.php>wholesale used cell phone</a>
<a href=http://fiftymileothat.com/styles/cellphones/cell-phone-review/new-cell-phone-review.php>new cell phone review</a>
<a href=http://fiftymileothat.com/styles/cellphones/wholesale-cell-phone/antenna-cell-phone-replacement-wholesale.php>antenna cell phone replacement wholesale</a>
lg mobile phones forum
<a href=http://fiftymileothat.com/styles/cellphones/used-cell-phone>used cell phone</a>
Contents
Bootloader Development
Concepts
- Programming with ICSP is useful when the target board is produced in batch. The producer can download a program even when the chip is on the target board.
- However, ICSP requires an external programmer.
- To allow the user to change the program after production but without the need of an external programmer, bootloader becomes useful.
- Bootloader is a small program installed via ICSP. Everytime the device is reset, the bootloader is run first. The bootloader first detects the default serial channel whether the user wishes to download a new program to the device. If so, the bootloader will pause there, and wait for the user to download the hex file from the PC. The hex file is written to the device via RTSP instructions in the bootloader. If a new download is not necessary, the bootloader redirects to the previously installed user's program.
- The disadvantage of bootloaders is that they consume some of the memory of the device.
Developer | Source | Platform | User Guide | Remarks |
---|---|---|---|---|
ingenia | Assembly | Windows |
| |
Tiny | Assembly | Windows | Web |
|
Elektronika | Hex | Windows | txt |
|
dsPicBootloader
- The bootloader developed by ingenia is open source and it has been modified (see below) to suit our development using dsPic30f5011.
- The bootloader (hereafter called dsPicBootloader) employs the following settings:
- Use U2ART channel
- Use FRC, PLL16
- For 5011, the bootloader is located between 0x00AE00 to 0x00AFFE (512bytes). Refer to C:\Program Files\Ingenia\ingeniadsPICbootloader\ibl_dspiclist.xml after installing the GUI interface.
- Changes made to assembly code includes:
1. including p30f5011.gld and p30f5011.inc
.include "p30f5011.inc"
2. changing the config code of UART #0x8420 -> #0x8020
; Uart init mov #0x8020, W0 ; W0 = 0x8020 -> 1000 0000 0010 0000b mov W0, U2MODE ; Enable UART, AutoBaud and 8N1 clr U2STA
3. changing the start address 0xAE00 - 0x0100 = 0AD00
.equ CRC, W4 .equ ACK, 0x55 .equ NACK, 0xFF .equ USER_ADDRESS, 0x0100 .equ START_ADDRESS, 0xAD00 ; Relative to 0x0100
4. using Internal FRC and PLL16
config __FOSC, CSW_FSCM_OFF & FRC_PLL16 ;Turn off clock switching and ;fail-safe clock monitoring and ;use the Internal Clock as the ;system clock
5. disabling MCLR (optional)
config __FBORPOR, PBOR_ON & BORV_27 & PWRT_16 & MCLR_DIS ;Set Brown-out Reset voltage and ;and set Power-up Timer to 16msecs
6. changing all the related registers of U1ART to U2ART, all U1XXX => U2XXX
U2MODE, U2STA, U2BRG, U2RXREG, U2TXREG
7. changing all the related registers of IC1 to IC2, all IC1XXX => IC2XXX
IC2CON, #IC2IF, #IC2IE
dsPicProgrammer (Java-based Multi-Platformed)
- Ingenia developed a programmer (PC-side) that works only in Windows environment. The project for Linux environment is currently suspended.
- A simple programmer (hereafter called dsPicProgrammer) written in Java based on the library developed by RXTX has been developed here. The programmer supports both Linux and Windows environments, and may be used as a substitution for the official programmer developed by ingenia.
- The programmer has the following specification and limitations:
- Use baud rate of 57600bps (Not selectable).
- Only program dsPic30f5011 devices (Developers may change the source code for your devices).
- Protection against overwriting bootloader codes on devices.
- Dectection if application program does not have its reset() at address 0x100.
Special Consideration
- The bootloader assumes that the user program starts at address 0x100. This is usually the case, but there are always exceptions.
- To ensure that the user program always starts at address 0x100, you can create a customized linker script and customized reset() function as follows:
- Copy and modify the file named "crt0.s" from the directory "C:\Program Files\Microchip\MPLAB C30\src\pic30" to the project directory and include it.
.section .reset, code //previously .section .libc, code
- Copy and modify the linkerscript for the device (e.g. p30f5011.gld) to the project directory and include it.
.text __CODE_BASE : { *(.reset); //<-insert this line here *(.handle); *(.libc) *(.libm) *(.libdsp); /* keep together in this order */ *(.lib*); *(.text); } >program
Downloads
Program | Site 1 | Site 2 | Remarks |
---|---|---|---|
dsPicBootloader | click | click | Under "dsPicBootloader/", download ingenia.s and compile yourself |
dsPicProgrammer | click | click | Under "dsPicProgrammer/", dowload dsPicProgrammer.jar Alternatively, if you want to compile yourself or modify the source code, download COMDataHandler.java, COMPortManager.java, Pic5011Prog.java, Pic5011Protocol.java, and WriteBuffer.java under "dsPicProgrammer/" plus RdFileIntelHex.java under "IntelHexPaser/tags/0.02.00/". You should also install RXTX on your local machine as recommended in the readme file. |
Communication Protocol
- Communication Protocol is reviewed in ingenia bootloader user's guide section 2.1.3. The following summarises the key steps on the PC side (Refer also to section 2.2.2).
- Transmission is conducted in 8N1, i.e. 8-bit, no parity, 1 stop-bit
- Stage 1: User's configuation
- Select a baudrate
- Select a COM port channel
- Stage 2: Autobaud rate detection and version control
- Continuously sending a character "U" [0x55] via COM port
- Continuously waiting for an acknowledgment character "U", [ACK] = [0x55]
- Send command character [0x03]
- Receive 3 characters 1) Major Version 2) Minor Version 3) Acknowledgment [0x55]
- Prints the version number [Major.Minor] (e.g. 1.1) on screen.
- Stage 3: Loading and writing the program
- Load the user hex file, check integrity.
- Start loading file using:
- Read command character [0x01] + 24-bit address [High][Medium][Low]
- Receive 4-byte data [High][Medium][Low][ACK]
- Write command character [0x02] + 24-bit address [High][Medium][Low]+ Number of bytes [N] + [data 0] + [data 1] + ... + [data N-1] + [CRC]=(INTEL HEX8 Checksum - Sum modulo 256)
- Receive [ACK] or [NACK] = [0xFF]
- Note: Writing is in row mode access (i.e. erase and write a whole row, each row has 32 instructions, or 96 bytes because each instruction has 24 bits)
- Ensure the initial address of writing match an initial row position,
- Send the data corresponding to the whole row.
USB-RS232 Bridge
- As USB ports are becoming more and more common, COM ports and Parallel ports may be redundant in the next few years. This section explore the possibilities of programming the target board through a USB port.
- There are two options:
- Use an external USB/RS232 adaptor, the driver will emulate a virtual COM port, such as Prolific and FDTI. Ingenia has tested its bootloader with some USB-232 manufacturers (silabs, FTDI, etc..). However, the programming failed with our Prolific adapter. Application program may use JavaComm API (javax.comm) and/or RXTX to drive the COM port.
- Modified the bootloader program on PC to support USB communication. e.g. using jUSB and JSR-80 (javax.usb). External circuits such as PIC18F4550 and MAX232 are required.
|--User's App.--|-------Device Manager------|-------USB-RS232 Interface------|---dsPIC---| Option 1: +-------------+ +----------+ +----------+ +---+ +------------+ +-----+ +--------+ | Application |--| JavaComm |--| Virtual |==|USB|--| FDTI |--|RS232|==| Target | | Program | | RXTX | | COM Port | +---+ | Circuitary | +-----+ | Board | +-------------+ +----------+ +----------+ +------------+ +--------+ Option 2: +-------------+ +--------+ +---+ +------------+ +-----+ +--------+ | Application |----------| JSR-80 |==========|USB|--| PIC18F4550 |--|RS232|==| Target | | Program | | jUSB | +---+ | MAX232 | +-----+ | Board | +-------------+ +--------+ +------------+ +--------+
- Currently, when RXTX is incorporated with JavaComm API, operating systems supported include Linux, Windows, Mac OS, Solaris and other operating systems. On the other hand, jUSB and JSR-80 only works for linux.
FDTI Chipset
- FT232RL communicates with PC via USB to provide 1 UART channel.
- Datasheet can be downloaded here.
- Refer to Fig. 11 (Page 19) for Bus Powered Configuration.
- Refer to Fig. 16 (Page 24) for for UART TTL-level Receive [RXD -> 1], Transmit [TXD -> 4], Transmit Enable [CBUS2/TXDEN -> 3]. Omit Receive Enable [CBUS3/PWREN#] and use [CBUS2/TXDEN -> 2]
- Refer to Fig. 15 (Page 23) for LED Configuration: [CBUS0/TXLED#] and [CBUS1/RXLED#]
- Virtual COM Port Drivers can be downloaded here.
Programming the Device
Requirements
- Hardware
- PC with COM port (Windows XP Installed for MPLAB)
- ICD2 Programmer
- Target Board
- 5V Power Supply
- Software
- MPLAB IDE v7.50 or higher
- dsPicProgrammer (dsPicProgrammer.jar)
- RXTX driver
- Files
- dsPicBootloader (ingenia.hex). Original assembly code by ingenia can be downloaded from here.
- Application hex file (e.g. app.hex)
Loading Bootloader (Once only)
Step | Remarks |
---|---|
Install MPLAB IDE |
|
Install USB Driver |
|
Select Target Chip |
|
Target <-> ICD 2 |
|
ICD 2 <-> PC |
|
Load Bootloader |
|
Start Programming |
|
Finishing |
|
Loading Application
Step | Remarks |
---|---|
Install RXTX |
|
Connect target board |
|
Open a console window |
|
Start Programming |
|
Finishing |
|
Remote Access
- At the moment, local devices (e.g. EEPROM, ADC, DAC, etc.) can only be accessed locally through POSIX functions such as open(), read(), write(), ioctl().
- However, a client may need to access these devices on a remote server. This section reviews the background and gives some ideas on its possible implementation.
Requirements
- A remote file access protocol, to transfer "files" (i.e. device's data) such as:
- File Transfer Protocol (FTP): Required files are copied from sever to client for manipulation
- Remote Shell (RSH): Required files are copied from sever to client for manipulation
- Network File System (NFS): Required files are manipulated on sever
- An API to access files using a selected protocol, such as:
- lam_rfposix: A POSIX-like remote file service for Local Area Multicomputer
- API employed by VxWorks: VxWorks is a Unix-like real-time operating system, commonly used for embedded systems.
API Reference for VxWorks
- Reference:
- Related Libraies
- netDrv (netDrv.h): an API using FTP or RSH
- nfsDrv (nfsDrv.h): an API using NFS
To Do List
- Construct examples codes for using DSP library
- Construct examples codes for using Build-in library
- GUI Interface for Benchtop boards