Jump to content

midin

EstablishedMember
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About midin

  • Rank
    Newbrie
  1. Hi, just a quick idea - don't you think it would be good to have some place to discuss problems about SB IDE plugin development? Personally, I'm a newbie to the topic of creating such a special fragment of MFC application and the platform is quite specific so it is not easy to find solutions at stackoverflow forum or such. Thanks for at least considering it midin
  2. Yes, that's the only reasonable thing to do, I was just confused by that setting the clock rate externaly won't make it alone Thanks anyways, now it works as it should have M
  3. Thank you for your answer, now I realize I may have put this topic in incorrct thread, because what I'm trying to do is develop a plug-in for the SB IDE, so I was thinking I only use the Settings Clock Rate. The particular problem is I want to get the plugin to work after approximate time of 15ms. In the plugin syste there's a callback function which is called by every clock tick of the simulator (clk is the current count of ticks provided by the simulator itself), so I was just thinking putting something like if (clk < clockRate*15/1000) { // dont do anything return; } // code after 15ms will do the thing, but as you're saying when using delay_ms in the code for testing of the plugin will always look at the pragma. M
  4. Hi guys, how come that if I change the clock rate in the SourceBoost IDE simulator and then run the code with some delay_ms() functions, the "ticks counter" in the bottom of the screen still gives me the same number? For example I've got delay_ms(40) and I still get cca 156k ticks after that no matter how big the clock rate is... could you give me a hint why is that so? Thanks so much, midin
  5. Hello kind Sourcebost developers last two days I'm getting mad about my LCD driver that I written, cause I can't really make it work and don't know where the problem can be (tried on real device and also in the paid plugin of yours). These are the main functions, the delays are just as in the example for the LCD plugin (asm nop's): void sendDataToLCD_delay (char data, char rs) { RS = rs; LCD_SetupDelay(); LCD = data >> 4; // sending left nibble E = 1; // perhaps a little delay will be needed before and after LCD_EnablePulseDelay(); E = 0; // pulse Enable H/L to send the data LCD_HoldupDelay(); LCD_CycleMakeupDelay(); RS = rs; LCD_SetupDelay(); LCD = data & 0x0F; // sending right nibble E = 1; // perhaps a little delay will be needed before and after LCD_EnablePulseDelay(); E = 0; // pulse Enable H/L to send the data LCD_HoldupDelay(); LCD_CycleMakeupDelay(); } // Clears the LCD display void clearLCD (void) { sendDataToLCD_delay(clear_lcd, 0); delay_ms(2); } // initializes the LCD display void initLCD (void) { char a; //delay_ms(20); // delay_ms(20) before delay_ms(16); // delay_ms(20) before sendDataToLCD_delay(system_set_reset_4bit, 0); delay_ms(5); sendDataToLCD_delay(system_set_reset_4bit, 0); delay_10us(100); // min delay here of 100us sendDataToLCD_delay(system_set_reset_4bit, 0); delay_10us( 5 ); // standard command delay time sendDataToLCD_delay(system_set_4_bit, 0); delay_10us( 5 ); // standard command delay time sendDataToLCD_delay(entry_mode, 0); sendDataToLCD_delay(display_on, 0); //sendDataToLCD_delay(set_dd_ram, 0); } // Sends a string to certain position of the display void sendStringToLCD (char *s, char pos) { int ptr = 0; sendDataToLCD_delay(set_dd_ram+pos, 0); while (s[ptr] != 0) sendDataToLCD_delay(s[ptr++], 1); } The configuration is for PORTB - PORTB.RB5=E, PORTB.RB4=RS, PORTB.RB0-RB3 - DATA (D4-D7), RW=GND, I think the problem lies in the config, but I can't see it clearly. Could you give me a slight hint, am I missing some operation or do I send the data in a wrong way? Thanks for your help! Midin
  6. Hi again, my professor says that it is not possible to work with the lcd_driver.h for EasyPIC5 P18F4620, but he did not mention a straightforward reason. I tried to work it out and there seems to be a problem with missing LCD R/W port (not used), so it onlyworks with RS and E ports and I don't know what to write in the particular section of LCD_ARGS. Could you help me or probably tell me if it is possible use SourceBoost LCD driver and how or if it is neccessary to write my own driver for this particular board? The LCD is a standard HD47780. Thank you very much for answer as it is very important for me (semestr project work), midin
  7. Hello, I'm totally new to PIC and I can't overcome the following problem: I'm just trying to write a little program for the LCD on my PIC18f4620 and on the line with lcd_setup(); I'm getting the error failed to parse template arguments I have them set as follows #define LCD_ARGS 1, /* Interface type: mode 0 = 8bit, 1 = 4bit(low nibble), 2 = 4bit(upper nibble) */ \ 1, /* Use busy signal: 1 = use busy, 0 = use time delays */\ portd, trisd, /* Data port and data port tris register */ \ porta, trisa, /* Control port and control port tris register */ \ 3, /* Bit number of control port is connected to RS */ \ 2, /* Bit number of control port is connected to RW */ \ 1 /* Bit number of control port is connected to Enable */ What do I do wrong? Thanks for the answer, midin
×