Jump to content

cry_viem

Members
  • Content Count

    9
  • Joined

  • Last visited

Everything posted by cry_viem

  1. cry_viem

    1-wire master module

    hi!, everyone! i have a problem about 1-wire master module on tiva c, i don't know how to config the pin for 1-wire ? any examples about 1-wire master module are so helpful to me, thank a lot!
  2. cry_viem

    Reset Tiva C by sorfware

    tks a lot!, sorry for this inconvenience !! =.=!
  3. cry_viem

    Reset Tiva C by sorfware

    hi! i'm doing a project about security home and i consider how to reset Tiva C by sorfware. it mean the kit can automatically reset itself????. that's great if it's possible!!! help me!! your commets are very helpful to me!!!!!
  4. cry_viem

    eeprom interface

    tks a lot, i saw!
  5. cry_viem

    eeprom interface

    hi, everyone, i need some help from you, i have a problem with writing and reading eeprom in lm4f120, i don't know how to do. your comments is very useful for me, thanks all
  6. cry_viem

    QEI module

    hi! everyone, i have a lm4f120h5qr, i try to code for QEI but it didn't work, may i was wrong or lmf4120h5qr have no QEI module ? help me please, i'm newbie so i may not know a lot of thing. here is my code #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "inc/hw_gpio.h" #include "driverlib/sysctl.h" #include "driverlib/pin_map.h" #include "driverlib/gpio.h" #include "driverlib/qei.h" int pos; void main(void) { //set system clock SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); //enable qei0 module SysCtlPeripheralEnable(SYSCTL_PERIPH_QEI0); //enable portD SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); // GPIOPinTypeQEI(GPIO_PORTD_BASE, GPIO_PIN_6); // GPIOPinConfigure(0x00031806);// i could found GPIO_PD6_PHA0 in PART LMF4120H5QR // so i fill direct hex code from other PART ??? //-------------------------------------------------------------------- QEIDisable(QEI0_BASE); QEIIntDisable(QEI0_BASE,QEI_INTERROR | QEI_INTDIR | QEI_INTTIMER | QEI_INTINDEX); QEIConfigure(QEI0_BASE, QEI_CONFIG_CAPTURE_A | QEI_CONFIG_NO_RESET | QEI_CONFIG_QUADRATURE | QEI_CONFIG_NO_SWAP,1000); QEIPositionSet(QEI0_BASE, 500); QEIEnable(QEI0_BASE); while (1) { //i set breakpoint at here to update view pos pos = QEIPositionGet(QEI0_BASE); SysCtlDelay (1000); } } the variable "pos" = 0 all time of debugging ????? thank all? @@'
  7. cry_viem

    encoder interface circuit

    hi! everyone, i am learning about QEI module of LM4F120H5QR, Let me ask: Do i need a interface circuit to connect the encoder signal and QEI pin of LM4F120? And if i need one, please help me made it? tks a lot!!!!!!!!
  8. cry_viem

    gpio

    tks Lyon!
  9. cry_viem

    gpio

    hi everyone,i'm a newbie, i have a trouble when i code for interrupt pin pf0 to toggle led at pf2, it doesn't work when i press button, help me plz!, i use lm4f120xl, tks a lot, here r my code: #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "driverlib/sysctl.h" #include "driverlib/gpio.h" #include "driverlib/interrupt.h" void pressing(void) { GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_2,~GPIOPinRead(GPIO_PORTF_BASE,0xff)); // toggle led pf2 SysCtlDelay(16000); // anti-noise } void main(void) { SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); // 50MHz SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); // enable port F GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE,GPIO_PIN_2); // GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_2,0xff); //---------------interrupt configure---------------- GPIOPinTypeGPIOInput(GPIO_PORTF_BASE, GPIO_PIN_0); // sw2 GPIOPinIntEnable(GPIO_PORTF_BASE, GPIO_PIN_0); GPIOIntTypeSet(GPIO_PORTF_BASE, GPIO_PIN_0,GPIO_FALLING_EDGE); GPIOPortIntRegister(GPIO_PORTF_BASE, pressing); IntMasterEnable(); while(1) { ; } }
×