Search the Community

Showing results for tags 'PIC32'.



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
    • FRC
    • 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 4 results

  1. Howdy. I have what I think is a fairly basic question: Which (non-FPGA) processor boards support Pmod modules? Is there any chance to see a table that shows each of the current ARM and PIC32 processor boards down a left-hand column and then the quantity of each of the Pmod ports (of each different configuration) on the middle of the chart? Thanks
  2. Hello everyone, PIC32MX and PIC32MZ base support has been merged in RIOT-OS. In addition, basic support for the chipKIT Wifire has also been merged. RIOT is a small operating systems for embedded devices with the following features: Multi-threading support, with a full stack for each thread Some POSIX compatibility network stack with IPv6 support Drivers for various sensors And many other things The current support for the chipKIT Wi-Fire is still very incomplete: only a small GPIO driver has been merged. I have written some drivers for SPI, I2C, Random Number Generator (available on my github repository) but it would help a lot if more people contribute: writing drivers for peripherals, reviewing & verifying pull requests, writing documentation in the wiki... How to try RIOT-OS on the Wifire If you are on Windows, follow the instructions on the wiki: https://github.com/RIOT-OS/RIOT/wiki/Build-RIOT-on-Windows-OS. Install the MIPS toolchain Set MIPS_ELF_ROOT environment variable to the MIPS toolchain directory export PATH=$PATH:$MIPS_ELF_ROOT/bin cd examples/hello-world make BOARD=pic32-wifire The file to flash is bin/pic32-wifire/hello-world.hex. The UART output is configured as baudrate 9600, one stop, no parity bit. Useful links: - RIOT repository: https://github.com/RIOT-OS/RIOT/ - toolchain: https://community.imgtec.com/developers/mips/tools/codescape-mips-sdk/download-codescape-mips-sdk-essentials/ Fran├žois
  3. I'm trying to write a code that will display the character H in the left top corner when the potentiometer is fully counter-clockwise, H in the middle when potentiometer is halfway between ccw and cw, and finally H in the right top corner when potentiometer is fully clockwise. Though my code works, I used a for loop to iterate through all the LEDS before the place where I want to put the H character. I wanted to know how I can change the position of the column number of the Oled. Here's my code: #include<p32xxxx.h> #include<plib.h> #pragma config POSCMOD=HS, FNOSC = PRIPLL #pragma config FPLLIDIV = DIV_4 #pragma config FPLLMUL = MUL_16 #pragma config FPLLODIV = DIV_4 #pragma config FWDTEN = OFF #pragma config FPBDIV=DIV_4 #define prtVddCtrl IOPORT_F #define prtVbatCtrl IOPORT_F #define prtDataCmd IOPORT_F #define prtReset IOPORT_G #define bitVddCtrl BIT_6 #define bitVbatCtrl BIT_5 #define bitDataCmd BIT_4 #define bitReset BIT_9 #define cbOledDispMax 512 //max number of bytes in display buffer #define ccolOledMax 128 //number of display columns #define crowOledMax 32 //number of display rows #define cpagOledMax 4 #define POT 2 void initADC(int amask){ AD1PCFG = amask; AD1CON1=0x00E0; AD1CSSL=0; AD1CON2=0; AD1CON3=0x1F3F; AD1CON1SET = 0x8000; } int readADC(int ch) { AD1CHSbits.CH0SA = ch; AD1CON1bits.SAMP=1; while(!AD1CON1bits.DONE); return ADC1BUF0; } BYTE rgb0ledBmp[cbOledDispMax]; void DelayMs(int n){ int k = 0; for(k=0;k<n*10;k++){ } } void OledHostInit() { unsigned int tcfg; /* Initialize SPI port 2. */ SPI2CON = 0; SPI2BRG = 15; //8Mhz, with 80Mhz PB clock SPI2STATbits.SPIROV = 0; SPI2CONbits.CKP = 1; SPI2CONbits.MSTEN = 1; SPI2CONbits.ON = 1; /* Make pins RF4, RF5, and RF6 be outputs. */ PORTSetBits(IOPORT_F, bitVddCtrl|bitVbatCtrl|bitDataCmd); PORTSetPinsDigitalOut(prtDataCmd, bitDataCmd); //Data/Command# select PORTSetPinsDigitalOut(prtVddCtrl, bitVddCtrl); //VDD power control (1=off) PORTSetPinsDigitalOut(prtVbatCtrl, bitVbatCtrl); //VBAT power control (1=off) /* Make the RG9 pin be an output. On the Basic I/O Shield, this pin ** is tied to reset. */ PORTSetBits(prtReset, bitReset); PORTSetPinsDigitalOut(prtReset, bitReset); } BYTE Spi2PutByte(BYTE bVal) { BYTE bRx; /* Wait for transmitter to be ready */ while (SPI2STATbits.SPITBE == 0); /* Write the next transmit byte. */ SPI2BUF = bVal; /* Wait for receive byte. */ while (SPI2STATbits.SPIRBF == 0); /* Put the received byte in the buffer. */ bRx = SPI2BUF; return bRx; } void OledDspInit() { /* We're going to be sending commands, so clear the Data/Cmd bit */ PORTClearBits(prtDataCmd, bitDataCmd); /* Start by turning VDD on and wait a while for the power to come up. */ PORTClearBits(prtVddCtrl, bitVddCtrl); DelayMs(1); /* Display off command */ Spi2PutByte(0xAE); /* Bring Reset low and then high */ PORTClearBits(prtReset, bitReset); DelayMs(1); PORTSetBits(prtReset, bitReset); /* Send the Set Charge Pump and Set Pre-Charge Period commands */ Spi2PutByte(0x8D); Spi2PutByte(0x14); Spi2PutByte(0xD9); Spi2PutByte(0xF1); /* Turn on VCC and wait 100ms */ PORTClearBits(prtVbatCtrl, bitVbatCtrl); DelayMs(100); /* Send the commands to invert the display. This puts the display origin ** in the upper left corner. */ Spi2PutByte(0xA1); //remap columns Spi2PutByte(0xC8); //remap the rows /* Send the commands to select sequential COM configuration. This makes the ** display memory non-interleaved. */ Spi2PutByte(0xDA); //set COM configuration command Spi2PutByte(0x20); //sequential COM, left/right remap enabled /* Send Display On command */ Spi2PutByte(0xAF); } void OledPutBuffer(int cb, BYTE * rgbTx) { int ib; BYTE bTmp; /* Write/Read the data */ for (ib = 0; ib < cb; ib++) { /* Wait for transmitter to be ready */ while (SPI2STATbits.SPITBE == 0); /* Write the next transmit byte. */ SPI2BUF = *rgbTx++; /* Wait for receive byte. */ while (SPI2STATbits.SPIRBF == 0); bTmp = SPI2BUF; } } void OledUpdate() { int ipag; int icol; BYTE * pb; pb = rgb0ledBmp; for (ipag = 0; ipag < cpagOledMax; ipag++) { PORTClearBits(prtDataCmd, bitDataCmd); /* Set the page address */ Spi2PutByte(0x22); //Set page command Spi2PutByte(ipag); //page number /* Start at the left column */ Spi2PutByte(0x00); //set low nybble of column Spi2PutByte(0x10); //set high nybble of column PORTSetBits(prtDataCmd, bitDataCmd); /* Copy this memory page of display data. */ OledPutBuffer(ccolOledMax, pb); pb += ccolOledMax; } } void CharTable(int index){ switch(index){ case 17: //character H Spi2PutByte(0x00); Spi2PutByte(0xFF); Spi2PutByte(0x10); Spi2PutByte(0x10); Spi2PutByte(0xFF); Spi2PutByte(0x00); break; }; } void setPageNumber(BYTE pagnum){ PORTClearBits(prtDataCmd, bitDataCmd); /* Set the page address */ Spi2PutByte(0x22); //Set page command Spi2PutByte(pagnum); //page number /* Start at the left column */ Spi2PutByte(0x10); //set low nybble of column Spi2PutByte(0x10); //set high nybble of column PORTSetBits(prtDataCmd, bitDataCmd); } void main(){ int a; int repeatccw=0; int repeatcw=0; int repeathor=0; OledHostInit(); OledDspInit(); OledUpdate(); setPageNumber(0x00); T3CON = 0x8070; PR3 = 0xFFFF; initADC(0xFFFB); int k=0; while(1){ a = readADC(POT); a=a>>5; if(a==0b00000){ if(repeatccw==0) repeatccw++; else if(repeatccw!=0) continue; OledUpdate(); setPageNumber(0x00); CharTable(17); repeathor=0; repeatcw=0; } else if(a==0b10000){ if(repeathor==0) repeathor++; else if(repeathor!=0) continue; OledUpdate(); setPageNumber(0x00); for(k=0;k<64;k++) Spi2PutByte(0x00); CharTable(17); repeatcw=0; repeatccw=0; } else if(a==0b11111){ if(repeatcw==0) repeatcw++; else if(repeatcw!=0) continue; OledUpdate(); setPageNumber(0x00); for(k=0;k<110;k++) Spi2PutByte(0x00); CharTable(17); repeathor=0; repeatccw=0; } } }
  4. I have had these microcontrollers from Digilent for some time but have never needed the Vref+ pin until now. From my understanding, it should be on the ADC or somewhere near it on the PIC32 pins. I have tried looking through the datasheets and have only found that pin42 on the UC32/IO-shield is the correct pin for the Vref+. I also tried calling and had recieved no help there. Can anyone help me locate the Vref+ pin as I am using this as the reference input to the micro-controller. The board is a PIC32MX340f512h