Search the Community

Showing results for tags 'chipkit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 32 results

  1. Hello, my name is Alexandre. I'm doing my master's degree that involves Chipkit use of CANbus with Arduino IDE. MPIDE is not an option for now. When I build the can example in Arduino IDE the plib.h error occurs: "C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\chipKITCAN\chipKITCAN.cpp:46:21: fatal error: plib.h: No such file or directory #include <plib.h> ^ compilation terminated." How can I remove the plib.h dependecy and write directly to the hardware? I really need to solve this in order to continue my paper, so any hep is very welcome. Thanks.
  2. Hi, I am trying to install Arduino IDE with the Digilent Core on a Windows 10 machine. I've tried different Versions from 1.6.8 to 1.9beta. When I try to use the Additional Boards Manager URL it fails at the Signature check. If I install it manually the IDE is not able to find "/bin/pic32-g++.exe". Where do I have to put the files under "chipkit-core" ? Is there a working json-file for automatic installation ? What am I doing wrong ? Thanks for help Markus
  3. Greetings! I have an Pro MX7 that I want to use as a development platform for a project and have a question on performance differences between MPIDE and MPLAB X. From what I understand, MPIDE is an Arduino-like environment that works with a lot of Arduino libraries. I like the sound of that because it could make things "easier" to just use a library than create it all myself and Arduino seems to be the "go to" platform for hobbyists. However, I wonder if MPIDE suffers from poorer performance than I'd get trying to do the same thing in MPLAB. A classic example with arduino being digitalwrite() being "expensive" in terms of performance versus directly working with the I/O port. But there are more direct ways right? I've tried messing with MPLAB Harmony, which has libraries to cover most things I need, but to be honest I'm finding it a big confusing. I also don't know if they'd be any better/worse than arduino libraries? The project I'm wanting to tackle is a complex one (at least for me) although on the MCU side it isn't too complex. It's a pinball machine. So, in essence it has to do the following: Play background music Play sound effects mixed with the music/other effects Display animated graphics on a 128x32 dot matrix display (these need constantly refreshed at ~70Hz like a video interface, they do not store a 'frame' locally) Read all the above from a microSD card Control an LED matrix, probably at least two shift registers for 8x8 = up to 64 LEDs Read from a switch matrix, again probably 8x8 = up to 64 switches Control open drain FETs for solenoids (probably again via shift registers). Around 10-12 or so. However, I'm toying with the idea of using PWM to control the power of solenoids. The first 3 I worry about consuming a lot of cycles because switch closures for #6 can not be missed. So my question is, would using MPIDE be viable, or do I need to work at a lower level to get enough performance? Is it doomed regardless and a second MCU would be needed to handle the A/V functions?
  4. Hi Everyone, I am trying to figure out what is the pinout for the push buttoms, I used 4,33,36,37, and did not work, I also used 4, 78, 80 and 81 due to a reference from my professor and stiil did not work If you guys can help me out will be great thanks ESSo
  5. I recently purchased the chipkit UC32 from digilent to do a labview project but when I connect it to my Windows 10 laptop, it says “USB device not recognized”. In the device manager of my computer I see the error in the port under Universal Serial Bus Controllers and it has the yellow triangle error symbol next to “Unknown USB Device (Device Descriptor Request Failed)” I have tried many things to try and get it working but have failed. Please help
  6. There were several places to get chipKIT frizting files, but I pulled them into one parts bin to download. Please let me know if this doesn't work! http://fritzing.org/projects/chipkit-and-accessory-boards It should include uno32 uc32 max32 wf32 chipKITPro MX4 Basic i/o Shield Motor Shield Pi Shield
  7. Greetings, I would like to replace the default PIC32MX250F128B microcontroller with a PIC32MX130F064B part on the Digilent ChipKit DP32 board and use an Arduino bootloader. I tried burning chipKIT-DP32-v01000303.hex by retargeting PIC32MX130F064B, but this did not work. I am assuming now that I need to make a few tweaks to the bootloader source files and recompile bootloader using MPLAB X. Has anyone done this before? What do I need to do? Thanks, Joel
  8. I'm having problems printing data on-screen, when the program is about to write it, the board freezes, it won't even allow me to reset. In the module of the MAX30100, Vin is connected to 3,3v, GND to GND, SCL to RB8, SDA to RB9, there are also 4k7 resistances conected between SDA and 3,3v, the same goes for SCL and 3,3v. INT remains unplugged. The almost fully white screen is the result of using the ChipKit board. The image filled with data shows the results obtained with an Arduino UNO board, wich were proved right with a saturometer. The last image shows the module for the MAC30100. The files are the libraries used and the program. I tried changing the communication speed from 100kHz to 400kHz but there wasn't any changes. I also tried it with a pull-up resistence on the INT port of the MAX30100. examples.7z MAX30100.7z
  9. Hi All, I have tried to use chipkitcan library from Sublime Deviot. Deviot uses platformio as build platform. I have been able to install the microchip legacy peripheral libraries in platformio and so able to compile, but I run into linker issues, symbols not found. The linker scripts for my architecture are properly found but it sounds to me that the static library for the peripheral is not found. I have verified that the linker script contains the OPTIONAL("libcmh_peripheral.a") and the same for the architecture specific linker and library. This works fine with IMPDE and with Arduino IDE (after intalling peripheral libraries). Is there anything in the compiler or IDEs that is hardcoded to find the static libraries? any environment variable or so? Thanks
  10. Hi All, I am trying to use the ChipKITCAN library. This is a wrapper for the microchip CAN network library. I am using the legacy peripheral library to do this. I have been able to build the demo using MPIDE but I haven't been able to run it successfully. Is there any clear set of steps to run the demo in a chipkit max32? Also, I have been able to build this using Arduino IDE but running in the same issue. Any help is appreciated.
  11. I want to debug my Arduino sketch using MPLAB-X (ver 3.61) and after running into a dead end with loading the ELF file, I decided to try my hand at importing the sketch using the MPLAB plugin - "chipKIT Import Plugin (ver 1.0.4) Note: I am using the Digilent Core with the Wi-FIRE board (rev C), not the chipKIT core from chipkit.net. Attached are two screenshots. The first is the Plugin description and the second is the Project setup box. With respect to the latter, I'm encountering two problems: (1) It doesn't like my Core location, even though that is the folder where platform.txt is located; and (2) my target board pull down list is empty, although it's possible this problem would go away if (1) was solved. Any thoughts?
  12. JovanYong

    chipkit wf 32 webserver support php

    Is the example given by chipkit wf 32 for webserver able to support .php file?
  13. I just want to check if it possible for chipkit wf32 to communicate to mysql. For example, inserting data from the sensors that connected to the chipkit and send the latest data to mysql database.
  14. Hi! I'm a big fan of standard tools, i.e. silicon vendor independent, like the Segger J-Link Programmer-Debugger I've reviewed. The Segger J-Link programmer-debugger lists Microchip PIC32MX and PIC32MZ among the MCUs it supports. Has anyone managed to connect the Segger J-Link and debug against a chipKIT board? Thank you!
  15. Hello, I am working with the chipKIT Max32, chipKIT Network Shield, and ti / Stanford Analog SHIELD from Digilent. I need to be able to generate various analog signal remotely (Ethernet). I have not been successful using the Analog SHEILD with the Max32 (much less the addition of the Network Shield). However, using my Arduino Uno, I am able to generate a signal using the "passthrough" and "ramp" example with the Analog Shield. I would continue to use the Uno, however, I need the extra digital I/O the Max32 (Mega format) has to offer. Also, I have verified basic communication with Max32 using the "blink" example. 1) What is the probable cause of my failure with the Max32 versus the Uno? 2) What corrective action should I take? Boards in use: Max32 Rev E, Analog SHIELD Rev D, Network SHIELD Rev C Software: passthrough and ramp examples included with the Analog Shield library, Arduino IDE 1.6.13 Note: I had looked at using MPIDE with the chipKIT Max32, but the website for MPIDE recommended the most up version of the Arduino IDE. So, MPIDE is one option (of which I am aware) I have not tried, yet. Thank you for any assistance you can offer.
  16. Good Day, I'm thinking of picking up the LabView Physical Computing kit that includes the Microchip PIC...i.e. the ChipKit WF32. I saw that there is a PMOD shield for the UNO standard, but it doesn't say specifically that it is supported on this ChipKit board. It only mentions some of the older boards. Does this shield work properly with this ChipKit? It would be great if it did, as I have a ton of PMODs that I bought for my Nexys4 DDR. My son would love to use them with ChipKit. Thanks, Dave
  17. Good morning, Is there a way to mix C with assembly code for the UC32 when using Arduino IDE? Document AT1886 describes how to accomplish this for Atmel chips, but I am wondering if the same thing is possible for the Chipkit devices since they use PIC microcontrollers? Here is some more background: I am writing a program for the UC32, and have an assembly program for the PIC32MX340 that I want to call. The assembly function has several arguments, as well as an output. I am wondering if there is any documentation for how to pass data to an assembly program from C? Additionally, which compiler does Arduino IDE use for the Chipkit UC32? It would help if I could find that information. Thanks, Ryan
  18. Two questions... many thanks in advance: 1) Per https://www.digilentinc.com/Data/Products/TI-ANALOG-SHIELD/AnalogShield_rm_rev3.pdf, ​"The Analog-to-Digital input converter (ADC) and Digital-to-Analog output converter (DAC) both use the standard Arduino form factor SPI bus pins and use independent chip selects." Question: For those of us developing our own library variants, what are the CS numbers? I am not seeing this documented. Update: From the attached snippet of the schematic, and the likelihood that "CS" = "SYNC" = "SYNCN" = "CSN" = "SS" among other possible nomenclature, is CS for the ADC header pin 3, and CS for the DAC header pin 6? (Also see attached close-up of the Shield's header, which suggests pin 0 on P7 is pin 0 for the Arduino Uno at least. Note the nomenclature is clear on the screen-printing next to the header: ADCCS and DACCS.) Update: Argh! The schematic pin numbering is 1-based; the silk-screened header pin numbers on the Shield are 0-based! ...Really now, this all ought to be documented unambiguously and consistently. SO... are the pin numbers for the chip selects for ADC and DAC 5 and 2, respectively, for the Uno? 2) From the same document, "The jumper needs to be set for whether the connected board uses IOREF, 3V3, or 5V0 for the I/O for the SPI interface." Question: Which setting is needed for which supported Arduino board? That is: For the chipKIT Uno32, the jumper should be ____________For the chipKIT UC32, the jumper should be ____________ For the chipKIT Max32, the jumper should be ____________For the chipKIT WF32, the jumper should be ____________For the Arduino Uno, the jumper should be ____________ As a bonus, suggestions for determining the correct jumper setting from a schematic would be really handy.
  19. Hello, I have a compile error with the SoftwareSerial library included in ChipKit-core 1.1.0.-18 (the latest released build for manual install at this time). I need the SoftwareSerial.h library for several external devices, but it will not compile the headers on ChipKit boards. I am able to build against the Arduino and Adafruit boards, but all of the Cerebot and ChipKit boards exhibit the same error. Any help would be appreciated. Environment: Arduino IDE 1.6.8 ChipKit-core 1.1.0-18 (latest release build manually installed, also exposed error in 1.1.0.-13)) uC32 (but tested on other Arduino, Adafruit, and ChipKit platforms) The code to reproduce for me is very simple: #include <SoftwareSerial.h> void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: } Just including the SoftwareSerial.h library and selecting any ChipKit device gives these errors: Arduino: 1.6.8 (Windows 8.1), Board: "chipKIT uC32" C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware [Lots of successful file builds] IC:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\cores\pic32" "-IC:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\variants\uC32" "-IC:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial" "C:\Users\Aaron\AppData\Local\Temp\buildf71554d8a69c5d822f0c8bd06bd78dc0.tmp\sketch\SoftwareSerialExample.ino.cpp" -o "C:\Users\Aaron\AppData\Local\Temp\buildf71554d8a69c5d822f0c8bd06bd78dc0.tmp\sketch\SoftwareSerialExample.ino.cpp.o" In file included from C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial\examples\SoftwareSerialExample\SoftwareSerialExample.ino:20:0: C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:68:16: error: '_IOPORT_PC' was not declared in this scope { _BV(14), _IOPORT_PC}, // CN0 - RC14 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:69:16: error: '_IOPORT_PC' was not declared in this scope { _BV(13), _IOPORT_PC}, // CN1 - RC13 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:70:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 0), _IOPORT_PB}, // CN2 - RB0 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:71:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 1), _IOPORT_PB}, // CN3 - RB1 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:72:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 2), _IOPORT_PB}, // CN4 - RB2 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:73:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 3), _IOPORT_PB}, // CN5 - RB3 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:74:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 4), _IOPORT_PB}, // CN6 - RB4 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:75:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 5), _IOPORT_PB}, // CN7 - RB5 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:76:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 6), _IOPORT_PG}, // CN8 - RG6 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:77:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 7), _IOPORT_PG}, // CN9 - RG7 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:78:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 8), _IOPORT_PG}, // CN10 - RG8 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:79:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 9), _IOPORT_PG}, // CN11 - RG9 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:80:16: error: '_IOPORT_PB' was not declared in this scope { _BV(15), _IOPORT_PB}, // CN12 - RB15 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:81:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 4), _IOPORT_PD}, // CN13 - RD4 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:82:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 5), _IOPORT_PD}, // CN14 - RD5 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:83:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 6), _IOPORT_PD}, // CN15 - RD6 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:84:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 7), _IOPORT_PD}, // CN16 - RD7 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:85:16: error: '_IOPORT_PF' was not declared in this scope { _BV( 4), _IOPORT_PF}, // CN17 - RF4 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:86:16: error: '_IOPORT_PF' was not declared in this scope { _BV( 5), _IOPORT_PF}, // CN18 - RF5 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:87:16: error: '_IOPORT_PD' was not declared in this scope { _BV(13), _IOPORT_PD}, // CN19 - RD13 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:88:16: error: '_IOPORT_PD' was not declared in this scope { _BV(14), _IOPORT_PD}, // CN20 - RD14 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:89:16: error: '_IOPORT_PD' was not declared in this scope { _BV(15), _IOPORT_PD}, // CN21 - RD15 ^ Using library SoftwareSerial in folder: C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial (legacy) exit status 255 Error compiling for board chipKIT uC32. So, what's broken? I've : Tested on two different PCs (windows 7 & windows 8.1) Tried two manually installed release versions of ChipKit-core Compiled on other platforms with complete success (using their libraries) What should be done next?
  20. Hello, I'm trying to get a Hello World app to work using a chipKit Pro MX4. I've followed along with example code written for a Starter Kit board changing and making adjustments to the MPLAB X Harmony configurator as I go along, although there really isn't that much difference between the two as the sample.x project is written for a PIC32MX795. I'm using the USART driver with the following code in system_config.h (See the configuration code generated by Harmony and stored in the system_config.h file). My state machine simply adds a bunch of strings to the Transmit Buffer Queue using the DRV_USART_BufferAddWrite function provided by the driver module. This seems to be working successfully as I do receive a valid handle from the function. The problem is there is nothing being sent. I have, in addition to using the trainer board, brought this up using the simulator and there really is nothing being sent on UART 1. So, when the Transmit Buffer Queue fills up with buffers to be sent the USART driver begins denying any further attempt to add message to the queue. All of that works as expected. The sample application seems to be doing nothing else significant and when run on simulator (since I have not trainer board for that part) I see the text appear in the USART 2 Output window. (Note: the MX4 board uses UART 1 for the J8 connector and so I've modified to use UART 1 instead of 2... no big deal there.) I've been up most of the night or all night pouring over data sheets and the like trying to figure this out, but I've come across nothing significant. My thinking on this is that the simulator knows nothing about the specific card and its many connections. It knows only of the microcontroller family and part so that means that it's not really something specific to the chipKIT MX4 board, but some difference in the part itself. We all know how terse datasheets can be, so I must be missing something basic with regard to PIC32MX vs. PIC32MZ. That's why I have focused mainly on looking at the part's documentation. My question is: Has anyone else done anything like this, or ran into a similar problem, or maybe someone else has been able to get this working and I'm missing something basic? I just have been very unsuccessful at figuring this out. I'm not new to embedded systems, but I'm an older guy trying to refresh and update my skills after being out of the industry for a long time. I most certainly could be missing something obvious. As I said I've been up many long nights persevering. Any help would be greatly appreciated. This is the code generated by Harmony in the system_config.h file. I've also included my state machine and its header file which is simple. There isn't very much code here that wasn't generated by MPLAB Harmony Configurator, so that's adding to my being stumped. I'm wondering if there is something deeply hidden in the Harmony framework that is actually malfunctioning. I just can't be sure. I look forward to your response. Thank you much. // ***************************************************************************** /* Clock System Service Configuration Options */ #define SYS_CLK_FREQ 80000000ul #define SYS_CLK_BUS_PERIPHERAL_1 10000000ul #define SYS_CLK_UPLL_BEFORE_DIV2_FREQ 48000000ul #define SYS_CLK_CONFIG_PRIMARY_XTAL 8000000ul #define SYS_CLK_CONFIG_SECONDARY_XTAL 32768ul /*** Ports System Service Configuration ***/ #define SYS_PORT_AD1PCFG ~0xffff #define SYS_PORT_CNPUE 0x0 #define SYS_PORT_CNEN 0x0 #define SYS_PORT_B_TRIS 0xc3ff #define SYS_PORT_B_LAT 0x0 #define SYS_PORT_B_ODC 0x0 // ***************************************************************************** // ***************************************************************************** // Section: Driver Configuration // ***************************************************************************** // ***************************************************************************** // ***************************************************************************** /* USART Driver Configuration Options */ #define DRV_USART_INTERRUPT_MODE false #define DRV_USART_BYTE_MODEL_SUPPORT false #define DRV_USART_READ_WRITE_MODEL_SUPPORT true #define DRV_USART_BUFFER_QUEUE_SUPPORT true #define DRV_USART_CLIENTS_NUMBER 1 #define DRV_USART_SUPPORT_TRANSMIT_DMA false #define DRV_USART_SUPPORT_RECEIVE_DMA false #define DRV_USART_INSTANCES_NUMBER 1 #define DRV_USART_PERIPHERAL_ID_IDX0 USART_ID_1 #define DRV_USART_OPER_MODE_IDX0 DRV_USART_OPERATION_MODE_NORMAL #define DRV_USART_OPER_MODE_DATA_IDX0 #define DRV_USART_INIT_FLAG_WAKE_ON_START_IDX0 false #define DRV_USART_INIT_FLAG_AUTO_BAUD_IDX0 false #define DRV_USART_INIT_FLAG_STOP_IN_IDLE_IDX0 false #define DRV_USART_INIT_FLAGS_IDX0 0 #define DRV_USART_BRG_CLOCK_IDX0 10000000 #define DRV_USART_BAUD_RATE_IDX0 9600 #define DRV_USART_LINE_CNTRL_IDX0 DRV_USART_LINE_CONTROL_8NONE1 #define DRV_USART_HANDSHAKE_MODE_IDX0 DRV_USART_HANDSHAKE_NONE #define DRV_USART_XMIT_INT_SRC_IDX0 INT_SOURCE_USART_1_TRANSMIT #define DRV_USART_RCV_INT_SRC_IDX0 INT_SOURCE_USART_1_RECEIVE #define DRV_USART_ERR_INT_SRC_IDX0 INT_SOURCE_USART_1_ERROR #define DRV_USART_XMIT_QUEUE_SIZE_IDX0 18 #define DRV_USART_RCV_QUEUE_SIZE_IDX0 8 #define DRV_USART_POWER_STATE_IDX0 SYS_MODULE_POWER_RUN_FULL #define DRV_USART_QUEUE_DEPTH_COMBINED 26 Here's my state machine and its related code from app.c Please forgive/ignore some of the unnecessary code I put in for debugging purposes. void APP_Tasks ( void ) { static unsigned long int number = 0; static char string[200]; static int messageCount; static DRV_HANDLE usartBufferHandle; int debugDummy = 1; char * pointerToString = &string[1]; int stringLength; /* Check the application's current state. */ switch ( appData.state ) { /* Application's initial state. */ case APP_STATE_INIT: /* Keep trying to open the driver until we succeed. */ { messageCount = 0; /* open an instance of USART driver */ appData.usartHandle = DRV_USART_Open(APP_UART_DRIVER_INDEX, DRV_IO_INTENT_WRITE); if (appData.usartHandle != DRV_HANDLE_INVALID ) { /* Update the state */ appData.state = APP_STATE_GENERATE_MESSAGE; } break; } case APP_STATE_GENERATE_MESSAGE: { char * c = NumberToString(&string[1], number, 9, true); *c = '\r'; *(c + 1) = '\n'; *(c + 2) = '\0'; number++; appData.state = APP_STATE_SEND_MESSAGE; break; } case APP_STATE_SEND_MESSAGE: { stringLength = strlen(&string[1]); pointerToString = &string[1]; DRV_USART_BufferAddWrite( appData.usartHandle, &usartBufferHandle, pointerToString, stringLength); if(usartBufferHandle != DRV_HANDLE_INVALID) { if(messageCount++ < 100001) { appData.state = APP_STATE_GENERATE_MESSAGE; } else { appData.state = APP_STATE_WAIT4SENT; } } break; } case APP_STATE_WAIT4SENT: { debugDummy++; int i = debugDummy; break; } default: { debugDummy++; /* PROGRAM COUNTER SHOULD NEVER REACH THIS CODE! */ /* TODO: Handle error in application's state machine. */ break; } } } And finally, here is my header file from app.h. #ifndef _APP_H #define _APP_H // ***************************************************************************** // ***************************************************************************** // Section: Included Files // ***************************************************************************** // ***************************************************************************** #include <stdint.h> #include <stdbool.h> #include <stddef.h> #include <stdlib.h> #include "system_config.h" #include "system_definitions.h" #include "driver/driver.h" // DOM-IGNORE-BEGIN #ifdef __cplusplus // Provide C++ Compatibility extern "C" { #endif // DOM-IGNORE-END // ***************************************************************************** // ***************************************************************************** // Section: Type Definitions // ***************************************************************************** // ***************************************************************************** #define APP_UART_DRIVER_INDEX DRV_USART_INDEX_0 // ***************************************************************************** /* Application states Summary: Application states enumeration Description: This enumeration defines the valid application states. These states determine the behavior of the application at various times. */ typedef enum { /* Application's state machine's initial state. */ APP_STATE_INIT=0, APP_STATE_GENERATE_MESSAGE, APP_STATE_SEND_MESSAGE, APP_STATE_WAIT4SENT, } APP_STATES; // ***************************************************************************** /* Application Data Summary: Holds application data Description: This structure holds the application's data. Remarks: Application strings and buffers are be defined outside this structure. */ typedef struct { /* The application's current state */ APP_STATES state; DRV_HANDLE usartHandle; /* TODO: Define any additional data used by the application. */ } APP_DATA; // ***************************************************************************** // ***************************************************************************** // Section: Application Callback Routines // ***************************************************************************** // ***************************************************************************** /* These routines are called by drivers when certain events occur. */ // ***************************************************************************** // ***************************************************************************** // Section: Application Initialization and State Machine Functions // ***************************************************************************** // ***************************************************************************** /******************************************************************************* Function: void NumberToString (char * string, unsigned long int (number) Summary: Convert a number to a string. Description: This function will store a string containing the value of an unsigned long integer to a string containing the value written out in long form using English. Precondition: All other system initialization routines should be called before calling this routine. Parameters: None. Returns: None. Example: <code> NumberToString(&string, num); </code> Remarks: Storage string must be large enough to hold max unsigned long written out in English */ char * NumberToString (char * string, unsigned long int number, int e, bool outside); /******************************************************************************* Function: void APP_Initialize ( void ) Summary: MPLAB Harmony application initialization routine. Description: This function initializes the Harmony application. It places the application in its initial state and prepares it to run so that its APP_Tasks function can be called. Precondition: All other system initialization routines should be called before calling this routine (in "SYS_Initialize"). Parameters: None. Returns: None. Example: <code> APP_Initialize(); </code> Remarks: This routine must be called from the SYS_Initialize function. */ void APP_Initialize ( void ); /******************************************************************************* Function: void APP_Tasks ( void ) Summary: MPLAB Harmony Demo application tasks function Description: This routine is the Harmony Demo application's tasks function. It defines the application's state machine and core logic. Precondition: The system and application initialization ("SYS_Initialize") should be called before calling this. Parameters: None. Returns: None. Example: <code> APP_Tasks(); </code> Remarks: This routine must be called from SYS_Tasks() routine. */ void APP_Tasks( void ); #endif /* _APP_H */ //DOM-IGNORE-BEGIN #ifdef __cplusplus } #endif //DOM-IGNORE-END /******************************************************************************* End of File */
  21. Hello all This is related to the current hardware: Chipkit Max32 with Network Shield. Issue: Xively library files will not work with chipkit max32+ethernet shield. I have been suffering this change for a while, the MPIDE 2015 release got botched with the arduino update. I had to download the 2015 test release or rely on the totally functional 2013 release. Currently using the MPIDE 2015 test release. So, later on, getting the Xively library files proved to be difficult to utilize, errors on top of errors. Other option was to use the chipkit-core library files also available for Arduino IDE. But the network shield fails to operate. Xively library files worked without any errors. Now, I can either work with xively library files on Arduino IDE or operate the network shield through the MPIDE. Has anyone figure out if there is a solution for any of my issues? Debugging the code is insane after the update.
  22. I generated a code for my USART on a chipkit Max32 board using MPLab Harmony based on the tutorial given at this link http://microchip.wikidot.com/harmony:example-usart-static-wf32-steps. The code compiles well and uploads to my board but when I try to interface it with my laptop it keeps reading 0xFF on the RX buffer and even when I tried sending a character (e.i: 0x20) the terminal on my computer won't see it. I tried with different terminal emulators (YAT, Realterm), I also downloaded the FTDI driver from http://www.ftdichip.com/Drivers/VCP.htm but nothing seems to fix or change a thing about my issue. I am using Windows 10, the latest version of MPLab X and the XC32 compiler. I selected the correct board in the Project properties. I have also tried the example code provided with MPLab Harmony but that also doesnt work. One thing I should mention is that the receive buffer knows when I character has been sent to it but it returns the wrong value.
  23. Hi, I was attempting to use the PmodOLED and was attempting to get it's demo code correctly. The demo code claimed you can use the Pmod Shield header JC, but it did not seem to be working. So, I did a bit of research and found out what the problem was and successfully found a way to fix it and have the Pmod Shield work. Check out my answer below for what you need to do.
  24. The websites for the chipKIT Max32 and Network Shield both list multiple revisions of schematic (D vs E for the Max32; D vs F for the Network Shield). Both websites, however, only list a single orderable part number. What revision / version of hardware am I ordering? To add to the confusion, I called Digilent today and the sales gal confirmed with shipping that both units are only shipping revision C. ???