Just a quick note to finalize STM32 flashing topic. As you may know ST also produces his own debugger/programmer called ST-Link. It supports either JTAG and SWD interfaces. You can purchase ST-Link USB adapter but there is a better option. If you are in to STM32 microcontroller business you probably already own one of ST32 Discovery boards. Since I have STM32VLDiscovery near by this is how we can program another STM32F103RBT6 board using only four wires.

In discovery board locate CN3 jumpers and disconnect them as they connect discovery board to debugger.

Then locate CN2 pins and connect them to target boards JTAG connector as follows:

VDD (pin 1) to JTAG VCC (pin 1)

SWCLK (pin 2) to JTCK (pin 9)

SWDIO (pin 4) to JTMS (pin 7)

GND (pin 3) to GND (pin 4)

Power both boards and open ST-Link utility. You can see that Medium Density board has been detected.

Now you can load binary file and program microcontrollers Flash memory. Using Target menu you can perform additional operations similar to J-Flash.

Interesting feature of ST-Link worth mentioning is MCU panel. Here you can do various things like Run code, halt, step, reset, core reset and read core registers. You can treat this panel as

some sort

quick debugger

You will find a great tutorial in user manual in ST-Link install location on your PC.

[via: http://www.scienceprog.com/]

 

Last time we have covered topic about flashing STM32 microcontrollers using bootlaoder. This is easiest and cheapest way of loading programs to MCU memory. But this isn’t the only way of doing this. Software can also be downloaded to using JTAG adapter which is used for debugging. This time we are not digging into debugging but staying only with programming.

You can download latest J-Link software from Segger Download page. You will be asked for adapter serial number which can be found on back side of J-Link adapter. Once installed you will get a bunch of programs used for various purposes. We are going to use J-Flash ARM which is used for programming microcontrollers using J-Link Adapter. J-Flash ARM is a GUI interface that allows easy work with ARM microcontrollers. It supports most of ARM microcontrollers including ARM7/9/11 and Cortex-M0/M3. Programming speed reaches up to 150kB/s.

Lets start J-Flash ARM to give it a try.

This is main window where you can see project details, Flash contents to be uploaded and LOG messages. If you have already connected your J-Link adapter to ARM board you can load compiled binary in any popular format like .hex, bin, etc.

Once loaded you will see its contents in a window. Next you can go directly to menu Target->Program&Verify. Adapter will automatically connect to target and initiate programming. If programmed memory area isn’t empty you will be asked if you need to erase overwritten area:

Usually you would go with Yes.

After couple of seconds its done:

To start your program without hitting reset button you can go to menu Target->Start Application or hit F9 keyboard key. This is it for basic programming. Lets go quickly through what else we can do with J-Flash ARM. Almost all fun can be reached within Target menu:

Here you can see a Test function where you can test programming and reading speed. Here is my test results:

Also you can secure or un-secure chip, check blank, fill flash memory with zeros, erase chip, verify and so on. These are basic functions that you would expect from programmer.

If you want more control on you programming then you can change project settings. To enter settings menu you should go to Options-Project Settings. Here you will find several settings tabs. General, Target interface, CPU, Flash and Production:

For instance in Target Interface you will be able to select JTAG or SWD and speeds before initialization and after initialization. Normally leave them to Auto to be safe. In CPU settings you can select your device manually. Also you can add some actions in to init sequence. Bu default there is a reset signal sent. But you for some reason may do other stuff like adding delay. Production settings allow to select some robust tasks when programming chips for production. Here you can even program device serial number in to selected memory location.

Normally for prototyping you don’t need to change any settings. It works fine out of the box. As you know normally JTAG adapters are meant to be more than just programmers. Their main purpose is debugging software. But if you have one it can serve both purposes.

[via: http://www.scienceprog.com/]

 

Recently I obtained a Samsung Galaxy Ace S5830 android mobile phone. It was released a year before but it seems to have enough power to run most of apps you can find around.

It is powered by Qualcomm MSM7227 ARM11 processor running at 832MHz. Has internal 158MB of internal memory and can support up to 32GB MicroSD flash card. Other features include GPS, WiFi, 320×480 TFT touch screen, 5MP camera and so on. Device is powered by Android OS v2.3. These are specs you can find on any mobile website. Smart phone devices are as valuable as there are some useful apps there. So I started wandering if there are electronics/microcontroller related apps that could be useful in daily work. Lets see what can we find in app store. First of all we are interested in free apps. Search on AVR microcontrollers gave me coupe results: AVR Fuse Calculator and Using Atmega128 apps. Lets see what are they capable of.

AVR Fuse calculator

This is free lightweight app for android phones developed by Michael Schwarz. If you have used web based fuse calculator this app practically has same functionality. It has a list of 144 supported AVR devices. Touch screen makes it easy to select device and mark fuses by selecting check-boxes with full fuse names. Instantly high and low fuse bytes are updated on the top of screen. After you have selected fuse you can easily generate AVRDude command line that can be used during MCU flashing.

This is number one app for daily use with AVR microcontrollers.

Using Atmega128

Another app I could find is Using Atmega128 (AVR128). This application is nothing more than a reference to Atmage128 specifications. It has some organized info on this microcontroller like specs, link to datasheet, some common circuits like clocking, reset, ISP, serial. There is a section about setting fuses using PonyProg and using bootloader.

This app is only reference so it can be used for quick refresher. But it is tied to single microcontroller so it might be useful for very small group of people.

AVR128 Assembly summary

This is another reference app developed by Black Lake. It is a Atmega128 assembly language reference. When you open it you can scroll through all asm instructions. Select any instruction to view its extended information including operand, its operation, flags affected and required clock cycles. Great reference if you are programming AVR using ASM language. But probably you will be using a PC based document when writing program. Also I find very hard to read grey fonts on a black background.

What about Arduino?

Speaking of Arduino, there is a better situation. There are two many of them so I would mention few of them. First app that is compatible with Samsung Galaxy Ace is called Arduino Reference developed by Rod Lalonde. It practically holds reference information you can find in Arduino project page. This is great for online use. Sadly it doesn’t keep track of changes. Last supported Arduino IDE is 0019.

Domotic Home with Arduino application is a nice attempt to automate home appliances using android device WiFfi functionality. All you need is Arduino with WiFi shield and relay board.

If you are looking to synchronize mobile with Arduino this is worth trying.

Another interesting App that can be used with any microcontroller is Audio Serial Out. Haven’t tested it but it looks promising. It allows controlling devices using audio output jack for serial data transfer. It lacks real time control but could be used to control robots, cameras and other gadgets with cheap implementation.

After this follows bunch of bluetooth communication apps that can be used for sending data to Arduino Bluetooth shield. As I have no means to test them right now I will leave this topic open.

PICmicro Database

The last app I’m gonna mention is PICmicro database. This application allows easy searching through mocrocontroller list, filter by several criteria like program memory, RAM and family. Can display specifications on selected micro as you would see in datasheet.

There are several more apps but mostly references or demo versions of paid. It seems that there is still way to go in this segment as smart mobile phones are spreading like a virus.

[via: http://www.scienceprog.com/]

 

Not every company can easily afford the complete custom software design. There are several reasons for it; however the main one is the drastic tendency of the multiple templates used in this field. The usual templates are meant for different cases including most kinds of the offered software. They are basically used when the new product is actually based on something already existing, so you are not forced to start everything from the very beginning. Instead you can just use the basic template and make some kind of IT remix with it. As a result you will get the newly created software in comparably small time. This means less efforts, time and skills; however you still can get enough money for this work. Sure thing this creation will never be as craved as the one made from the start, yet some of the clients are completely satisfied with it.

On the other hand there are cases when you just can’t use the basic stuff and have to perform the custom software design. This happens when the software is of the rare kind, so there are just not enough ready templates for it. On the other and the needed software can just be really specific, so you will have to make changes on the very first steps. This way even with the template to you will still perform the custom software design.

Mention that this kind of work is really well paid and meant for the highly professionals literally. Within ten persons performing the general design there’s only one being able to make the real high quality custom software design.

[via: http://www.scienceprog.com/]

 

There has been several requests among users to explain more about loading programs in to flash memory of STM32 microcontrollers.

This of course is a wide topic but lets focus on how to achieve result – flash program in to MCU. Depending on what arsenal is on your desk you can do in several different ways. Let’s try to go through them in practical way.

Embedded bootloader

All STM32 microcontrollers comes with built-in bootloaders that are programmed during production. Depending on device type flash memory can be programmed using one of interfaces like USART1 or USART2, USB, CAN. Mostly we are dealing with low, medium and high density devices so they can access bootloader using USART1 interface. USART1 can be connected to computer using RS232 interface or USART to USB driver chip like FT232. In order to enter bootloader special MCU pins has to be set to proper logical values. These are called BOOT0 and BOOT1 pins on a microcontroller. Boot pins can have several cases:

As you can see there are three cases: first case is when BOOT0 pin is tied to ground and BOOT1 is open or at logical state 0 then after reset program is executed from Main Flash Memory. This is your normal configuration when executing programs. Second case (BOOT1=0; BOOT0=1) means that after reset execution starts at System memory where built int bootloader resides. This is the case when we need to upload binaries via USART1. And third case means that program execution is performed in SRAM. So lets focus on second case – System memory. In many development boards you will find jumper pins where you can select BOOT0 and BOOT1 configurations. For instance in STM32F103RBT6 board these looks like this:

In image you can see that jumper settings already selects to run internal bootloader. What we do next is download Flash Loader Demonstrator which is a tool to interact with bootloader. Install it and launch. You will see screen where you will be able to select USART parameters. Be sure to select correct COM port:

Connect board USART1 to PC using RS232 cable and hit reset button. Then you can click Next to go to the next screen.

It confirms that you succesfully entered bootloader. Hit Next to proceed to device selection screen.

Target device is already selected automatically. If not – select right one from drop down list. You can also see here other information like bootloader protocol version (2.2), Flash memory mapping. Click Next if selected device seems OK. You get to screen where you can do all sort of things:

You can erase all or selected memory pages. Download a .hex (.bin or .x19) to microcoller flash memory. Select ‘Jump to the user program‘ if you want to execute program immediately after download. You can also select to Verify after download to make sure if upload was successful. You can also upload existing binary from device Flash memory in to file to back up it. You can enable or disable Flash protection. And finally proceed to ‘Edit option bytes‘ to set User Option bytes or add write protection to selected memory pages.

Let’s leave that behind and simply download .hex file in to device. Simply select file from dialog menu select to verify after download an jump to user program like this:

Hit Next and in a few seconds it is done.

Here we can see that binaries are successfully downloaded and takes 2804 bytes and took 1 second to program.

When programming is done you can return BOOT0 pin to ground in order to execute programs from main Flash memory after next reset.

Continue to next flashing method… TBD

[via: http://www.scienceprog.com/]

 

We live in an analog world where most physical variables are analog signals. However, a microcontroller can only process data that is available in digital format. It is precisely for this reason that the analog-to-digital conversion (ADC) is so important in embedded systems that interact with an analog environment. In this tutorial, we will discuss about the ADC capabilities of chipKIT UNO32 board and illustrate how to read an analog input signal from its ADC channels.

Analog-to-digital conversion

Theory

Many embedded applications deal with physical variables such as motion, temperature, pressure, relative humidity, light intensity, and sound. A microcontroller cannot directly handle these entities because i) they are non-electrical signals, and, ii) they are analog quantities, which means they have a continuous set of values over a given range, in contrast to the discrete values of digital signals. To enable the microcontroller to process these quantities, they must be somehow represented into digital signals. The first step in this process is to convert the physical signals into electrical signals, which requires the use of a transducer.

A transducer is an electro-mechanical system that converts physical signals into electrical signals or vice-versa. A simplest example of a transducer is a light dependent resistor or LDR, which can be used to measure the intensity of ambient light. An LDR is a special resistor whose resistance varies with intensity of light falling on its surface. The resistance of an LDR decreases as the light intensity goes up. The pictures below show the measurements of an LDR’s resistance under two different intensities of light falling on it.

LDR resistance is lower (1.31 KΩ) at higher light intensity

LDR resistance goes up (6.30 KΩ) when the light falling on it is blocked

An LDR in series with a fixed value resistor can be used to construct a mechanism for converting the light intensity into an electrical voltage. This will be discussed in more detail later. Another example of transducer is an electric motor, which converts an electrical voltage into motion.

Now the physical signal has been converted into an electrical signal but it is not yet ready for computer processing because of its analog nature. The next step, therefore, requires an analog-to-digital conversion (ADC) system that takes a continuously varying voltage input and returns a binary digital representation suitable for use by the microcontroller.

These days many microcontrollers are equipped with analog-to-digital conversion systems. The PIC32MX320F128H microcontoller on the chipKIT UNO32 board has got a built-in ADC with 16 ADC input channels. Out of these only 12 are accessible on Uno32 board through the header pins A0 through A11. The resolution of the ADC is 10-bit, which means 1024 (210) discrete binary representations (0 to 1023) can be made for a given range of an analog signal. The acceptable range of ADC is set through the reference voltage (VREF). The default set reference voltage for the PIC32MX320F128H microcontoller on the chipKIT UNO32 board is its supply voltage (Vcc = 3.3 V). This is also the maximum value of the analog voltage that can be applied to any ADC channel on the chipKIT UNO32 board. Suppose, if the range of the ADC is set to 0-3.3V (VREF=3.3 V), the ADC resolution can also be expressed in terms of voltage as 3.3/1024 ≈ 3.2 millivolts. This is the smallest change in the analog input voltage that is detectable by the on-chip analog-to-digital (A/D) converter. So, anything between 0 and 3.2 mV will be represented by decimal 0, between 3.2 mV and 6.4 mV by decimal 1, between 6.4 mV and 9.6 mV by decimal 2, …, and finally, between 3.2968 V and 3.3 V by 1023. You can see that with this arrangement, the maximum error in the digital representation of an analog voltage could be 3.2 mV. This is also known as quantization error.

Sometimes the range of the analog input voltage is too small compared to 3.3V and varies only a little bit. For example, the air temperature inside a room does not vary a lot. In such a case you can enhance the resolution of the A/D converter (thus reducing the quantization error) to track the temperature more accurately. Suppose if you know the output voltage from the temperature sensing transducer cannot go beyond 1V, then setting VREF = 1V results in an improved resolution of 1/1024 ≈ 1 mV. The A/D converter is now capable of detecting much smaller changes in the input signal. An external ADC reference voltage can be supplied to the microcontroller on the chipKIT UNO32 board through its AREF pin, which is labeled as A on connector J5. The maximum voltage that can be applied to this pin is 3.3V.

Circuit setup

In this tutorial, a 2.2K resistor is connected in series with an LDR to construct a voltage-dividing network, as shown below. The voltage across the resistor is measured through the ADC channel A0 of the Uno32 board. When light falls on the LDR, its resistance decreases, and consequently the voltage across the 2.2K resistor goes up. If the light is blocked from falling onto the LDR, the opposite happens. Therefore, the 10-bit ADC output is proportional to the intensity of light falling on the LDR. The board is connected to the PC and the ADC output will be sent over the serial port and displayed on the serial monitor window.

Sensing the analog world

LDR circuit setup on a breadboard

Writing sketch

Since the ADC outputs are sent over the serial line, the serial port and the baud rate must be initialized in the setup function. The analogRead() function is used to read an analog input signal from the analog pin specified inside the parenthesis. By default, the supply voltage of 3.3V is used as the reference voltage for A/D conversion, which means input voltages between 0 and 3.3 volts are mapped into integer values between 0 and 1023. In order to use an external reference voltage applied to the A pin, use analogReference(External) function in your sketch. Here’s the complete chipKIT sketch to read the input value at A0 ADC channel and print the ADC output to the serial monitor.

/*Tutorial 4:Analog to digital conversionDescription: Reads an analog signal input to A0 pin and send the10-bit ADC output to PC to display on the serial monitor.Board: chipKIT UNO32*/int ADC_OUTPUT;void setup() {Serial.begin(9600);}void loop() {ADC_OUTPUT = analogRead(A0);Serial.print("LDR sensor output = ");Serial.println(ADC_OUTPUT, DEC);delay(1000);}

Download the sketch file

Output

Upload the above sketch into the Uno32 board and open the serial terminal window from MPIDE. The ADC samples (integer ADC outputs) are printed on the window at 1 sec interval. You can watch how these numbers change with the changing intensity of the light falling on the LDR. If you put a finger over the LDR and block the light falling on it, the ADC output will be dropped abruptly.

chipKIT Uno32 board sends ADC output to PC through serial interface

ADC output displayed on serial monitor

[via: http://embedded-lab.com/]

 

Our first chipKIT tutorial is about reading and writing digital data (0 or 1) from and to an I/O pin of the chipKIT board. Digital inputs are useful to determine whether an incoming digital signal is logic HIGH or logic LOW. A simple application of digital input is reading the state of a push-button switch and perform some action based on if the switch has been pressed or not. Similarly, digital outputs are used by microcontrollers for many purposes, such as to enable or disable an external chip, drive LEDs and LCD displays, control relay switches, etc. In this tutorial, we will build a very simple circuit using a momentary push-button and an LED, both connected to the digital I/O pins of chipKIT Uno32. The state of the switch is continuously read by Uno32, which then toggles the LED on and off every time the switch is pressed.

Digital input and output

Circuit setup

[via: http://embedded-lab.com/]

 

The overall process of designing a microcontroller-based system is divided intotwo parts: designing the hardware of the system, and writing the control software for it. Before the design cycle begins, it is important to have good knowledge of the tools available for the chosen development platform. While we already explored the hardware features of the chipKIT UNO32 board in Exploring the chipKIT Uno32 board, it’s time to look at the software development process. The flowchart below gives an overview of how an application program is developed for the chipKIT board.

Software development process for the chipKIT board

[via: http://embedded-lab.com/]

 

The chipKIT Uno32 development board is based on the powerful PIC32MX320F128 microcontroller, which features a 32-bit MIPS processor core running at 80MHz, 128K of flash program memory, and 16K of SRAM data memory. The board can be powered via USB or an external power supply. The on-board USB-UART interface provides a communication path between the board and the MPIDE tool running on the PC. MPIDE stands for Multi-Platform Integrated Development Environment and is a complete tool for developing and downloading embedded applications into the chipKIT Uno32 board. Now let’s explore the chipKIT Uno32 board in more detail.

chipKIT Uno32 board

The complete description of the chipKIT Uno32 board can be found in its hardware manual available from the Digilent’s website. I am summarizing only the most important features here. Shown below is a picture, drawn by me, that shows the layout of the major components, jumpers, and connectors on the chipKIT Uno32 board.

Layout of the major components, connectors, and jumpers

Connection to PC

The Uno32 board uses a standard Mini-B USB connector for connection to a USB port on the PC. The FTDI FT232RQ chip next to the USB connector provides an USB-UART interface for a two-way serial communication between the PC and the board. The same serial port is used by the MPIDE to communicate with the serial bootloader running on the Uno32 board while downloading user applications.

Power supply section

The Uno32 can be powered either via USB or from an external power supply. The automatic switch-over circuit on-board causes the external supply to be used if both supplies are present. There are two voltage regulators present in the Uno32 board. The first regulates the external supply voltage to 5V and powers the +5V bus line (VCC5V0) on the board. The second regulates the VCC5V0 bus to 3.3V that goes to the 3.3V bus (VCC3V3) and also powers the PIC32 microcontroller. A 5.5 mm x 2.1 mm barrel connector is available to power the Uno32 board from an external power supply (wall adapter). The center terminal of the connector is wired as the positive supply voltage. The external power supply voltage must be in the range 7V to 15V.

Jumper JP2 provides an option to route the external power supply voltage through the on-board 5V regulator or directly to the VCC5V0 bus, bypassing the on-board 5V regulator. Normally, JP2 is in the REG position. This routes the external supply through the 5V regulator. If the external power supply is already a regulated +5V output, JP2 can be placed in BYP position to power the VCC5V0 bus directly from the external source.

The 6-pin POWER connector, J2, is used to power external circuits or shields connected to the Uno32 board. Pin 1 (RESET) is connected to the MCLR pin on the PIC32 microcontroller. This pin can be used to reset the PIC32 from an external circuit. The second and third pins provide 3.3V (maximum current 425 mA) and 5.0V (maximum current 900 mA) output, respectively, to power an external circuit or a shield plugged into the Uno32 board. The total current provided by pins 2 and 3 together, however, shouldn’t exceed 925 mA. Pins 4 and 5 (GND) provide common ground connections between the Uno32 and any external circuit. Pin 6 (VIN) is connected to the input of the external power supply connector. This pin can be used to provide the unregulated input voltage to the external circuit or the shield connected to Uno32.

Digital I/O pins

The chipKIT and Arduino systems both use logical pin numbers to identify digital I/O pins. The valid logical pin numbers for the Uno32 board are 0-43. The chipKIT Uno32 board provides altogether 42 I/O pins that are accessible through connectors J5, J6, and J7. Each I/O pin can source or sink a maximum of 18mA. However, to keep the output voltage within the specified voltage range (VOL = 0.4V, VOH = 2.4V), the pin current must be restricted to source and sink at most 7mA and 12mA, respectively. The maximum current that can be sourced or sunk across all I/O pins simultaneously is 200mA.

Connectors J5 and J6 are 2×8 female pin header connectors that provide access to 30 I/O pins. The outer row of pins (labeled 0 through 13, A, and G) corresponds to the I/O connector pins on an Arduino Uno board. The inner row of pins (labeled 26 through 41) are the extra I/O signals provided by the chipKIT Uno32.

Similarly, connector J7 is a 2×6 female pin header that provides access to the analog input pins on the PIC32 microcontroller. The outer row of pins corresponds to the six analog pins (A0-A5) on an Arduino Uno board, whereas the inner row of pins are the additional analog channels (A6-A11) provided by the Uno32. These analog pins can also be used as digital I/O pins. In that case, the logical pin numbers of A0-A11 would be 14-25.

So the total 42 I/O pins are distributed as follows:

  • Outer row of J6 and J5 -> 14 pins (logical pin numbers 0-13)
  • Outer row of J7 -> 6 pins (logical pin numbers 14-19)
  • Inner row of J7 -> 6 pins (logical pin numbers 20-25)
  • Inner row of J6 and J5 -> 16 pins (logical pin numbers 26-41)

The pin labeled as A on J5 is used to provide an external reference voltage for the microcontroller’s A/D converter. But it can also be used as a digital I/O pin, and its logical pin number is 42.

Pulse width modulation (PWM) pins

The I/O pins 3, 5, 6, 9, and 10 can also be configured to provide PWM outputs.

LEDs on the board

There are 5 LEDs (labeled as LED1 through LED5) on the chipKIT Uno32 board. LED1 and LED2 are communication status LEDs and they will blink when data is being sent or received between the
Uno32 and the PC over the serial connection. LED3 is located next to the barrel connector for external DC supply, and is basically the power-on indicator LED. The Uno32 board has two user LEDs, labeled LED4 and LED5, that are connected to digital I/O Pins 13 and 43. It should be noted that Pin 43 only goes to LED5 and not any connector pin. Driving the pin high turns LED5 on, driving it low turns it off.

Peripheral functions

The PIC32 microcontroller on the Uno32 board provides a number of peripheral functions. The following peripherals are provided:

  • Asynchronous serial communication ports: There are two UART ports (UART port1 and UART port2) available on the Uni32 board. Pin 0 and Pin 1 serves as RX and TX for UART1 port1 and are also connected to the FT232R USB-to-Serial converter on board. It is possible to use these pins to connect to an external serial device when not using the USB serial interface. This uses UART1 (U1RX, U1TX) on the PIC32 microcontroller. Similarly, UART port2 uses Pin 39 and Pin 40 for RX and TX functions respectively. This uses UART2 (U2RX, U2TX) on the PIC32 microcontroller.
  • Serial Peripheral Interface (SPI):SPI requires four signal lines (SS-slave select, MOSI-master output slave input, MISO-master input slave output, and SCLK-serial clock) to perform a full duplex communication between a master and a slave. These are provided by Pin 10 (SS), Pin 11 (MOSI), Pin 12 (MISO), and Pin 13 (SCK) on the Uno32 board. These signals also appear on connector J8, which may be used by some shields to access the SPI bus. Jumpers JP5 and JP7 are used to select whether the Uno32 operates as a Master (transmit on MOSI, receive on MISO) or a Slave (transmit on MISO, receive on MOSI) device. The shorting blocks on JP5 and JP7 are normally placed in the Master position for the Uno32 to function as an SPI master. Also, jumper JP4 is used to select PWM output or the SPI SS function on Pin 10. The jumper on JP4 should be in the RD4 position to select PWM output. It should be in the RG9 position to select the SPI SS function.
  • Inter-Integrated Communication (I2C): The PIC32 microcontroller shares the analog input pins A4 and A5 with the two I2C signals SDA and SCL. Jumpers JP6 and JP8 are used to select whether the analog pin functions or the I2C pin functions are being used. The shorting blocks are placed in the A4/A5 position to select the analog input function or general digital I/O. They are placed in the RG3/RG2 position to use the pins for I2C operation. This uses I2C1 (SDA1, SCL1) on the PIC32 microcontroller.The I2C bus uses open collector drivers to allow multiple devices to drive the bus signals. This means that pull-up resistors must be provided to supply the logic high state for the signals. The Uno32 board does not have any pull-up resistors for the I2C bus and therefore, must be provided externally.
  • External Interrupts: The five external interrupt pins of the PIC32 microcontroller are accessible through Pin 38 (INT0), Pin 2 (INT1), Pin 7 (INT2), Pin 8 (INT3), and Pin 35 (INT4).
  • Real time clock calender (RTCC): The PIC32 microcontroller contains an RTCC circuit that can be used to maintain time and date information. The operation of the RTCC requires a clock frequency of 32.768Khz. A space is provided (X2), just above and to the right of the PIC32 microcontroller IC, to solder a 32Khz watch crystal.
  • RESET: A reset button is available at the upper left corner of the board. Pressing this button resets the PIC32 microcontroller.

The picture below summarizes the various jumper settings and their functions.

[via: http://embedded-lab.com/]

 

chipKIT is an open source embedded development environment based on the popular Arduino platform. The major difference between the two platforms is the type of processor used in their hardware. The Arduino development boards are based on 8-bit Atmel microcontrollers which run at maximum clock speed of 16 MHz . On the other hand, the chipKIT hardware uses powerful 32-bit PIC processors running at 80 MHz clock, and thus provides improved performance over the traditional Arduino boards. I have started this new tutorial series on chipKIT, and I believe they will be helpful for beginners to start using this platform for their own embedded projects and designs. Because I am also new to the Arduino and chipKIT world, I would really appreciate your opinions, comments and suggestions regarding these tutorials.

chipKIT programming and interfacing

[via: http://embedded-lab.com/]

© 2011 Geko Geek This is a news aggregator website. Articles and images are copyrighted to their original source authors. Gekogeek takes no responsibility about the articles content Suffusion theme by Sayontan Sinha