Jump to content


  • Content Count

  • Joined

  • Last visited

  1. I don't quite understand your codesnippet... Could you explain?? Those variables what do they indicate?
  2. But how can i get rid of it... I use the same code for detecting, but for some reason it works better on some keys than others.
  3. no it is the dev board. I am using PE1, PE2, PE2 and PF1 actually. I am having some problems with the PF1 now. Please look at the my edit. above. @@Lyon
  4. @@Lyon well it is POrt E , and I don't quite understand what you are doing?? it won't add the function... i was thinking about the code itself.
  5. I've written a program, which switches the states of the LED when i Press it. It has been programmed so, that it works flawless on the select button on my µC LM3s6965. But when i change the buttons to be one of the other buttons, does the code not work properly. The code i've programmed only works for the select button, but when i choose to use the down,up,right,left button on my board as the input, it does do the same thing as when select was my input.. How come?? I don't understand how changing the input to another button can cause so many issues...
  6. I've changed my GPIO to include Port A. void init_gpio(void) { INT8S dummy; // Enable the GPIO port that is used for the on-board LED. SYSCTL_RCGC2_R = SYSCTL_RCGC2_GPIOF | SYSCTL_RCGC2_GPIOG | SYSCTL_RCGC2_GPIOD | SYSCTL_RCGC2_GPIOB |SYSCTL_RCGC2_GPIOA; // Do a dummy read to insert a few cycles after enabling the peripheral. dummy = SYSCTL_RCGC2_R; // Enable the GPIO pins for digital function (PD6, PF0, FP1, PG0 and PG1). GPIO_PORTD_DEN_R |= 0b01000000; // Red GPIO_PORTF_DEN_R |= 0b00000001; // Select LED GPIO_PORTG_DEN_R |= 0b00000011; // Yellow
  7. Since i haven't activated DEN for the RS_PIN I just figured it automatically would be low. So would it be fine to keep it low all the time or? I've changed it so my enable_pin is low inside my for loop.. for(i=0,i<1000000;i++) { enable_pin(OFF) } for(i=0,i<1000000;i++) { enable_pin(ON) } Something like this you were thinking?? It is still not working..
  8. well... right now i've just ignored the pins on port A...So I am only using PortB
  9. Thanks for the response My timings is correct, or maybe too long, my for loop take about 1 min to complete on section , this should more than plenty of time. I've made a function which operate the enable pin. I am really lost on what should have gone wrong here. The one i've used is this one http://web.alfredstate.edu/weimandn/lcd/lcd_initialization/lcd_initialization_index.html it seems the method is common for all LCD..
  10. i've edited my first post.. it is a LCD display (HD44780U (LCD-II) ) which is connected to the board using the pins on the board. the board has a OLED display on it, that is not the one, mine is externally mounted to it.
  11. I am having some problems initializing the LCD . µC I am using is LM3s6965. It has to be initialized in 4 bit mode, since 4 pins are only accesible. these are the ports PA6/I2CSCL - LCD_RW PA7/I2CSDA - LCD_RS PB2/I2C0SCL - LCD_D4_KEYB_F PB3/I2CSDA - LCD_D5_KEYB_E PB4/C0 - LCD_D6_KEYB_D PB5/C1 - LCD_D7 PB6/C0+ - LCD_E This problem is a big pain in the ass.. I would be very gratefull if anyone could find the error on why it is not working. I am of certain it just a minor thing, but i have my doubts.. LCD init code (1).zip
  • Create New...