Showing posts with label PIC32. Show all posts
    Showing posts with label PIC32. Show all posts

    Friday, December 16, 2011

    The new Cerebot MX7 cK board from Digilent is essentially a PIC32 chipKITTM Max32, a chipKIT Network Shield, and an MPLAB PICkit 3 all on a single board. At just US $99.99, that's a great deal. I haven't had a chance to play with one myself yet, but the value is obvious just from the description. I can't wait to try it out. For more info, visit http://bit.ly/CerebotMX7cK

    The Cerebot MX7cK is a microcontroller development board based on the Microchip PIC32MX795F512L, a member of the 32-bit PIC32 microcontroller family. It is compatible with Digilent’s line of Pmod™ peripheral modules, and is suitable for use with the Microchip MPLAB® IDE tools. The Cerebot MX7cK is also compatible for use with the chipKIT™ MPIDE development environment. ChipKIT and MPIDE is a PIC32 based system compatible with many existing Arduino™ code examples, reference materials and other resources. 
    The Cerebot MX7cK is designed to be easy to use and suitable for use by anyone from beginners to advanced users for experimenting with embedded control and network communications application. A built in programming/debugging circuit compatible with the Microchip MPLAB® IDE is provided, so no additional hardware is required for use with MPLAB. The kit contains everything needed to start developing embedded applications using either the MPLAB® IDE or the MPIDE. 
    The Cerebot MX7cK provides 52 I/O pins that support a number of peripheral functions, such as UART, SPI and I2C™ ports as well as five pulse width modulated outputs and five external interrupt inputs. Its network and communications features also include a 10/100 Ethernet interface, Full Speed USB 2.0 OTG interface, and dual CAN network interfaces. Ten of the I/O pins can be used as analog inputs in addition to their use as digital inputs and outputs. The Cerebot MX7cK can be powered in various ways via USB, or using an external AC-DC power adapter.

    Monday, November 28, 2011

    DesignSpark's chipKIT Challenge Open for Entry

    RS Components (RS), the trading brand of Electrocomponents plc (LSE:ECM), the world’s leading high service distributor of electronics and maintenance products, announced full details of its DesignSpark chipKIT™ Challenge, a global competition launching on 28 November 2011. Registration and further information can be found at: www.chipkitchallenge.com

    Run in partnership with Elektor and Circuit Cellar magazines across Europe, Asia Pacific and the US, the chipKIT Challenge is an online competition that challenges electronics design engineers, students and hobbyists to produce an energy efficient, eco-friendly design. Entrants will use the award-winning, free-of-charge DesignSpark PCB software tool from RS and the Digilent chipKIT Max32™ development platform featuring the 32-bit PIC32 microcontroller from Microchip Technology, a leading provider of microcontroller, analogue and Flash-IP solutions, to realise their designs.

    A panel of judges, comprising design engineers and experts, has been established to evaluate the projects based on a range of criteria including energy efficiency, originality, usefulness, and design optimisation. The competition winners will share a total cash prize of US$10,000. During the competition entrants will also be encouraged to share ideas and post updates to the RS online DesignSpark community and automatically qualify for a bonus Community Choice Award as well as entry into prize draws.

    Visit www.chipkitchallenge.com for more information

    Friday, August 19, 2011

    Digilent chipKIT™ Basic I/O Shield™ & Network Shield™ Introduction

    Digilent is proud to introduce two new expansion boards designed for use with the chipKIT™ line of Arduino™-compatible 32-bit microcontroller boards. They are the chipKIT Basic I/O Shield™ and the chipKIT Network Shield™. These expansion boards greatly increase the power and flexibility of chipKIT microcontroller boards, giving beginners more options while allowing advanced users to increase the scope of their designs.

    Friday, July 22, 2011

    Known issues with MPLAB C Compiler for PIC32 MCUs v2.00

    Microchip TCP/IP Stack compatibility

    Older versions of the TCP/IP stack had references to macros referencing debug freeze bits such as _SPI2CON_FRZ_MASK. The macros for these freeze bits should never have appeared in the processor header files and application code should not have been using them. The definitions were removed for the C32 v2.00 release. The July 2011 release of the Microchip Application Library with TCP/IP Stack version 5.36.2 removes references to these macros to correct compatibility with MPLAB C32 v2.00. Download the update here: http://www.microchip.com/mal

    Peripheral Library - UART2

    The UART peripheral library functions do not work correctly for the UART2 module on the PIC32MX3 and PIC32MX4 devices. The device-support include files pic32mx/include/proc/p32mx3.h and pic32mx/include/proc/p32mx4*.h contain an incorrect base address for the UART2 peripheral.

    #define _UART2_BASE_ADDRESS 0xBF806800
    should be
    #define _UART2_BASE_ADDRESS 0xBF806200
    for the PICMX3 and PIC32MX4 devices.

    This causes the peripheral library functions for the UART2 to access unimplemented SFR addresses rather than the correct UART2 SFR addresses.

    One workaround is to correct the _UART2_BASE_ADDRESS address value in your pic32mx/include/proc/pic32mx*.h header file and add a copy of the [C:\Program Files\Microchip\mplabc32\v2.00\pic32-libs\peripheral\uart\source\uart_lib.c] source file to your project.

    Uninitialized data clearing

    Uninitialized global variables should be cleared to zero on startup. There is an issue with the v2.00 startup code where variables allocated in the "common" section are not correctly zeroed on startup. One workaround is to disable support for commons by adding the compiler option "-fno-common" to the alternate settings field for your project. Another workaround is to modify the C startup code as described in this web forum post. http://www.microchip.com/forums/fb.ashx?m=588408

    Exception when using a Custom Linker Script

    The default startup code is initializing the bus matrix as if ram functions exist in a project, even when no such ram functions exist. This causes a problem whenever the end address of the kseg1_data_mem region is not 2k aligned in a custom linker script, since the bus matrix registers must be 2k aligned. To workaround the issue for now, add the following line to your custom linker script: _ramfunc_begin = 0;
    This causes the startup code to skip over the bus-matrix initialization code.

    Getting Support

    For technical support, please visit either the community web forum or http://www.microchip.com/support. To report a bug, please visit this forum post for instructions. Thanks!

    Thursday, May 26, 2011

    chipKIT for the Arduino™ Community has launched

    In case you haven't heard the news, the chipKIT™ for the Arduino™ community has launched! These chipKIT™ development boards are the first 32-bit microcontroller-based platforms that are compatible with existing Arduino™ hardware and software. chipKITs can be programmed using an environment based on the original Arduino™ IDE modified to support PIC32 that also still supports the original Arduino™ line.


    You can order a board directly from Digilent Inc. NKC Electronics already has protoshields available, just a few days after the chipKIT launch.

    Download the multi-platform IDE software from github and leave us constructive feedback in the community forums.

    Friday, December 18, 2009

    Eflightworks.net PIC32 on a DIP

    Introducing a new tool for universities and educational institutions enabled with Microchip’s PIC32 32-bit microcontroller. The Eflightworks.net PIC32 on a DIP allows you to create and perform labs using a PIC32 in a form factor that fits on a typical breadboard. At the heart of the board is Microchip’s PIC32MX4 USB processor.
    The PIC32 on a DIP board features:
    • PIC32MX440F256H 64-pin USB microcontroller
    • 8-MHz primary crystal
    • 32.768-kHz Secondary crystal (for RTCC)
    • USB device operation
    • Power from USB or external battery
    • microUSB connector
    • Access to all I/O pins
    • 4 programmable LEDs
    • 2 programmable switches
    • 2.6-x-0.8 52-pin DIP format
    • MCLR switch
    • ICSP header

    Monday, September 14, 2009

    Robotics Development Kit Announced by Microchip and Digilent

    Microchip Technology today announced the availability of a PIC32 32-bit microcontroller (MCU)-based robotics development kit through Digilent Inc. The Digilent Cerebot™ 32MX4 Robotics Development Kit (part # 32MX4) comes with a free version of Microchip’s MPLAB C Compiler for PIC32 and an integrated programming/debugging circuit that is compatible with the free MPLAB® IDE.

    Read the full press release: http://bit.ly/41KLUK

    Tuesday, May 05, 2009

    DEV-monkey reviews the PIC32 Starter Kit

    Watch the short video review here: http://bit.ly/Ga7yN or read the more in-depth review here: http://bit.ly/MifU2
    Microchip has put together a top-notch evaluation package that introduces engineers to the power of its new 32-bit PIC32MX MCUs. The company's approach to documentation makes it easy to find manuals and guides. This is a kit programmers can use to learn about the Microchip development and debug tools. After running a few demo programs, hardware engineers may decide to move up an Explorer-16 development board with a PIC32MX daughter card. Microchip should have PIC32 expansion boards available starting in June 2008. I stumbled on an error in the User's Guide, but Microchip's support people quickly got me squared away.

    Thursday, April 09, 2009

    Save PIC32 code (and maybe data) space by providing exit() in MPLAB C32

    The default exit() function, provided with the MPLAB C Compiler for PIC32 MCUs and called by the default startup code, does a lot of clean up that your application might not require. It does things like flushing I/O buffers. This could be completely unnecessary if your application never exits from your main function().

    You might want to consider providing your own exit() function to override the default implementation. This can save both code space and data space.

    If you're not using standard I/O, this stub implementation can save about 1 KB of code space and even some data space. Just add it to your project.
    void exit(int status)
    {
    while(1);
    }
    Even if you are using standard I/O, this stub could still save you a little space.

    Tuesday, April 07, 2009

    Testing the PIC32 I/O Speed

    Over on the Microchip web forums, it's not uncommon for someone to ask about how to achieve the PIC32's maximum I/O speed. The question seems to come up every few weeks. Lucio Di Jasio has a great blog post and example MPLAB IDE project showing how to get the most out of your PIC32 I/O. Theoretically, the peripherals can operate at the same top speed as the PIC32 core, 80 MHz. Lucio shows you how to get as close to the theoretical maximum as possible.

    Saturday, April 04, 2009

    PIC32 Design Challenge Top 5 from the ESC Keynote

    Here's the video from the 2009 ESC West Keynote. It shows the top 5 designs in the PIC32 Design Challenge. See more at http://www.mypic32.com

    Monday, March 30, 2009

    PIC32 awarded EDN's 19th Annual Innovation Awards


    EDN bestowed its 19th Annual Innovation Awards, honoring a diverse group of electronics engineers and the ground-breaking products they have produced. Microchip's PIC32 32-bit microcontroller was chosen in the Microcontroller category. Follow this link for the complete list of awards.

    Friday, March 06, 2009

    MPLAB C Compiler for PIC32 MCUs v1.05 Released

    New Features in v1.05

    Student Edition renamed Evaluation Version -- The student edition has been renamed the valuation version. This release also introduces a new academic version.

    Improved 16- and 32-bit FFT functions in the DSP Library -- The FFT functions have been significantly improved and optimized for the PIC32 instruction set. See the 32-bit Language Tools Libraries document (DS51685) for more information. Please visit Microchip's website for the revision C of this document (DS51685C).

    Binary Constants -- A sequence of binary digits preceded by 0b or 0B (the numeral '0' followed by the letter 'b' or 'B') is taken to be a binary integer. The binary digits consist of the numerals '0' and '1'. Note that this binary-constant syntax may not be accepted by other C compilers.

    Linker Memory-Usage Report -- This optional, informational report allows you to easily determine the program- and data-memory usage of your application. It allows you to see how much space is used by the project being linked and how much space is available on the target device. The memory-usage report appears on stdout and in the optional map file.

    • Using this feature with MPLAB IDE 8.20 and earlier -- On the linker's tab of the project build options, select to Use Alternate Settings. Add the --report-mem option to the Alternate Settings field. The memory-usage report will appear in the output window after a project build. (This option will appear as a checkbox in later MPLAB IDE releases.)
    • Using this feature on the command prompt -- Add the --report-mem option to the linker's command line. If you are calling the linker via the compilation driver, use the driver's -Wl option to pass the --report-mem option to the linker. The memory-usage report will appear on stdout.

    Improved malloc implementation -- This release contains a new malloc/free/realloc implementation based on the implementation written by Doug Lea and released to the public domain.

    • This is not the fastest, most space-conserving, most portable, or most tunable malloc ever written. However it is among the fastest while also being among the most space-conserving, portable and tunable. Consistent balance across these factors results in a good general-purpose allocator.
    • For a high-level description, see http://g.oswego.edu/dl/html/malloc.html
    • This implementation is also provided with the Newlib C Library.

    Instruction Macros -- The p32xxxx.h include file now contains a Nop() macro that issues a superscalar SSNOP instruction.

    gettimeofday() weak stub -- The time.h clock() and time() functions require a user-provided gettimeofday() helper function. The compiler's library now provides a weak stub implementation that allows the project link to complete without error, but you should provide your own implementation appropriate for your application.

    Microchip DSP Compatibility Wrapper functions -- This release provides new DSP wrapper functions intended to ease the migration from the Microchip DSP library for dsPIC DSCs to the general DSP library for PIC32 MCUs. See the 32-Bit Language Tools Libraries (DS51685C) document for more information on these new wrapper functions.

    Updated peripheral-library documentation -- The 32-bit peripheral library document is now distributed as a compiled help file (*.chm) rather than a PDF file.

    Support for PWP configuration bits -- The config pragma now supports enabling the Program Write Protect bits. See the PIC32MX Config Settings help file for information on the setting name and available values for each device.

    Visit http://www.microchip.com/c32

    Tuesday, March 03, 2009

    PIC32 Prefetch Cache Module Webinar

    Watch this 6-minute introduction to the PIC32 Prefetch Cache Module. The Prefetch Cache module plays a key role in the performance of PIC32 at higher frequencies. Learn how the Prefetch Cache module enables PIC32 to keep up its high performance. You will also learn about the construction and operation of Prefetch Cache module.

    Sunday, March 01, 2009

    PIC32 Development on Mac OS X using UBW32


    Phillip Burgess posted a great article describing how to use Brian Schmalz's UBW32 and Microchip's USB Bootloader to create a low-cost PIC32 development kit for Mac OS X. Visit his www.PaintYourDragon.com website for all of the details.

    Programming 32-bit Microcontrollers in C: Exploring the PIC32


    Looking for a good book to get you started programming in C for the 32-bit PIC32 MCU? Take a look at Lucio Di Jasio's Programming 32-bit Microcontrollers in C: Exploring the PIC32. The book describes the PIC32 microcontroller and has many useful examples in C. Keep in mind that this is not an introductory C language book; It expects you to be familiar with C programming already.

    Tuesday, February 17, 2009

    TechInsights Announces the 'Great 8' Designs in the Microchip PIC32 Design Challenge

    TechInsights, the daily source of essential business and technical information for the electronics industry, today announced the top eight designs in the Microchip PIC32 Design Challenge (www.myPIC32.com). This announcement marks the start of the fourth and final phase of this year-long contest, which is sponsored by Microchip Technology Inc. and Digi-Key Corporation, as the exclusive distributor. Three final winners will be announced April 1st at the Embedded Systems Conference in Silicon Valley. More than 5,700 community members rated and voted to select the top eight designs submitted during this international competition. To review the "Great 8" design finalists, visit http://www.mypic32.com/web/guest/contestants.

    Read the full press release here.

    Friday, November 21, 2008

    An example PIC32 assert() function implementation

    screenshot
    I wrote a simple assert() implementation that you can customize for your application. This implementation writes the assert message to a simple array for inspection in the watch window. You should be able to easily customize the assertion failure behavior for your application.

    #pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_18
    #pragma config FPLLIDIV = DIV_2, FWDTEN = OFF
    #pragma config FCKSM = CSDCMD, FPBDIV = DIV_8
    #pragma config OSCIOFNC = OFF, POSCMOD = HS
    #pragma config IESO = OFF, FSOSCEN = OFF, FNOSC = PRIPLL
    #pragma config CP = OFF, BWP = OFF, PWP = OFF
    #include <p32xxxx.h>
    #include <plib.h>
    #include <stdarg.h>
    #include <stdio.h>
    #include <stdlib..h>

    #ifndef __DEBUG
    #define assert(ignore) ((void)0)
    #else
    #undef assert
    #undef __myassert
    #define assert(expression) \
    ((void)((expression) ? 0 : \
    (__myassert (#expression, __FILE__, \
    __LINE__), 0)))

    #define __myassert(expression, file, line) \
    __myassfail("Failed assertion `%s' at line %d of `%s'.", \
    expression, line, file)

    static void
    __myassfail(const char *format,...)
    {
    va_list arg;
    static char mystderr[0x80];
    va_start(arg, format);
    (void)vsprintf(&mystderr[0], format, arg);
    while(1);
    va_end(arg);
    }
    #endif

    int
    main (void)
    {
    SYSTEMConfig(80000000, SYS_CFG_ALL);
    int x = 1;
    int y = 2;

    assert((1+3)==(x+y));
    return 0;
    }

    Comments?

    Microchip licenses this software to you solely for use with Microchip products. Microchip and its licensors retain all right, title and interest in and to the software. All rights reserved.

    This software and any accompanying information is for suggestion only. It shall not be deemed to modify Microchip’s standard warranty for its products. It is your responsibility to ensure that this software meets your requirements.

    SOFTWARE IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS LICENSORS BE LIABLE FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. The aggregate and cumulative liability of Microchip and its licensors for damages related to the use of the software will in no event exceed the amount you paid Microchip for the software.

    MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE TERMS. If you do not accept these terms, you must remove the software from your system.

    Thursday, November 20, 2008

    What are PIC32 synthesized/macro instructions?

    The MPLAB Assembler for PIC32 MCUs also supports a number of synthesized/macro instructions intended to make writing assembly code easier. The LI (load immediate) instruction is an example of a synthetic macro instruction. The assembler generates two machine instructions to load a 32-bit constant value into a register from this single synthetic instruction.
    The assembler synthesizes instructions for
    • A 32-bit Load Immediate
    • A load from a memory location
    • A GP-relative load or store
    • An extended branch conditional
    • A two-operand form of some three-operand instructions
    • An unaligned load/store instruction
    Assembly directives, such as .set noat, .set nomacro, and .set noreorder, disable these normally helpful features for cases where you require full control over the generated code. See this previous post.

    Tuesday, November 18, 2008

    PIC32 Assembler Directives that Control Code Generation

    When inspecting MPLAB Assembler for PIC32 MCUs (pic32-as) source code, you may have noticed some new assembler directives such as .set noat and .set nomacro. These directives are specific to PIC32 MCUs and affect the way that pic32-as assembles your code.

    The following excerpt from the upcoming MPLAB Assembler, Linker, and Utilities for PIC32 MCUs User’s Guide describes these new directives.

    .set noat

    When synthesizing some address formats, pic32-as may require a scratch register. By default, the assembler will quietly use the at ($1) register, which is reserved as an assembler temporary by convention. In some cases, we don't want the compiler to use that register. The .set noat directive prevents the assembler from quietly using the at register.

    .set at

    Allow the assembler to quietly use the at ($1) register.

    .set noautoextend

    By default, MIPS16 instructions are automatically extended to 32 bits when necessary. The directive .set noautoextend will turn this off. When .set noautoextend is in effect, any 32-bit instruction must be explicitly extended with the .e modifier (e.g., `li.e $4,1000'). The directive .set autoextend may be used to once again automatically extend instructions when necessary.

    .set autoextend

    Enable auto-extension of MIPS16 instructions to 32 bits.

    .set nomacro

    The assembler supports synthesized instructions, an instruction mnemonic that synthesizes into multiple machine instructions. For instance, the sleu instruction assembles into an sltu instruction and an xori instruction. The .set nomacro directive causes the assembler to emit a warming message when an instruction expands into more than one machine instruction.

    .set macro

    Suppress warnings for synthesized instructions.

    .set mips16e

    Assemble with the MIPS16e ISA extension.

    .set nomips16e

    Do not assemble with the MIPS16e ISA extension.

    .set noreorder

    By default, the assembler attempts to fill a branch or delay slot automatically by reordering the instructions around it. This feature can be very useful.

    Occasionally, you'll want to retain precise control over your instruction ordering. Use the .set noreorder directive to tell the assembler to suppress this feature until it encounters a .set reorder directive.

    .set reorder

    Allow the assembler to reorder instructions to fill a branch or delay slot.