Search:

Type: Posts; User: HenrikOlsson; Keyword(s):

Page 1 of 4 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    14
    Views
    610

    Re: String matching?

    Thanks guys!
    I suppose everything is relative but I always try my best to write efficient code both from speed, size and readability point of view. I don't have any particular number I need to hit...
  2. Replies
    14
    Views
    610

    Re: String matching?

    Thanks!
    I can't imagine having a label for EACH keyword (if that's what you mean) and even if I do that I don't know of a way that lets me index thru them. Unless I somehow can construct an array of...
  3. Forum doesn't quite work when not logged in.

    Is it just me or is there something going on with the forum?
    If I'm not logged in I can get to the "home page" where I can see new posts in the left column but if I click on anyone of them all I get...
  4. Replies
    14
    Views
    610

    Re: String matching?

    Thanks! I've thought about that and it might be how it'll end up but it's quite prone to errors so I would like a more automatic way - if one existed. An upside of that idea is, I think, that it...
  5. Replies
    14
    Views
    610

    String matching?

    I'm playing around with the idea of writing a SCPI-parser. I need to match an incomming string to a series (could be dozens or hundreds) commands/keywords. For example an incoming string might look...
  6. Replies
    22
    Views
    9,508

    Re: Darrel's Multiple Software PWM

    So, if you want 1kHz PWM and 8 bit resolution it means the PIC needs to interrupt 1000*256=256,000 times per second. Each interrupt each channel uses 11 instructions and you want 4 channels so that's...
  7. Re: Is it possible to make LCDOUT asynchronous?

    Exactly. I've done it manually a couple of times but it's tedious and prone to errors and you have to redo it whenever you change the ISR...
    Good for you that you're that good at ASM, I bought PBP...
  8. Re: Is it possible to make LCDOUT asynchronous?

    Unfortunately DT-Ints will always save all the "default" system variables. There are some additional variables that gets defined only when needed and they are only saved (obviously) if they are...
  9. Re: Is it possible to make LCDOUT asynchronous?

    Right, good thing I didn't spend too much time on my example because if you can't allow more than 300us it wouldn't work anyway.

    Three alternatives (not the ONLY three of course):

    1) Use timer...
  10. Re: Is it possible to make LCDOUT asynchronous?

    CuriousOne,
    There are likely several ways this can be handled but we know WAY to little about your code.

    * How often or fast does your main loop have to run?
    * How often does the LCD need to...
  11. Replies
    6
    Views
    526

    Re: Component recomendations

    I don't agree, it won't work properly being driven with a gate drive voltage of only 5V. My suggestion is to ditch the logic level gate requirement and instead use a proper gate drive IC.

    The...
  12. Replies
    6
    Views
    526

    Re: Component recomendations

    There's a lot more to it than voltage… Like, for example, how much current you're going to switch with it.
    Just go to Digikey or Mouser, type in MOSFET and start narrowing it down from there....
  13. Re: Is it possible to make LCDOUT asynchronous?

    It's not really the LCDOUT command that is "slow" but the HD44780 controller, not so much for data but quite so when sending commands and the timing requirement can differ quite a bit between...
  14. Re: Non standard, 160 char LCD text displays, SPLC780 controller, anyone?

    HD44780 based 40x4 LCD does exist. The thing is that it has TWO controllers and therefor TWO enable lines. The two top lines is driven by the first controller chip and the two bottom lines are driven...
  15. Re: the simplest way to remotely control a pic?

    A pot wired to an analog input?
  16. Re: Doing something at predefined amount of steps?

    No, 200-300=65436.
    65435 is -101 in two's complement because 65435+101 = 65536 which, when being truncated to 16 bits is 0.

    If what you want is the difference between the two numbers while not...
  17. Re: Doing something at predefined amount of steps?

    It will wrap around, 0-1=65535 provided the variable where the result is stored is a WORD.
  18. Re: Doing something at predefined amount of steps?

    I don't know for sure but since it involves division my guess is that this is slower. Speed isn't always everything though.

    Tell you what, why don't you try both ways and measure the difference,...
  19. Re: Doing something at predefined amount of steps?

    I think what you're looking for is the modulo operator (//).
    It will return the remainder of a division so whenever it returns 0 it means it was an "even division".



    MainCount = MainCount + 1...
  20. Re: Watchdog timer not working as expected

    Yeah, it's been covered on the forum many times over the years but it keeps coming back.
    It is NOT the keyword DEFINE that's case sensitive but what you're actually DEFINEing, ie RESET_ORG,...
  21. Re: Watchdog timer not working as expected

    This is not correct. The original code is fine.

    The keyword DEFINE is a PBP keyword so it's NOT case sensitive, can be define, DEFINE, DeFiNE, DEFine, however you want to write it. The thing that...
  22. Replies
    17
    Views
    1,490

    Re: 18F45K40 Can't set PORTD.1

    Nice, I'm glad you figured it out.
    Strange thing is that, according to the datasheet, RD1PPS defaults to 0 so you shouldn't need to clear that. It would be interesting to HSEROUT[DEC RD1PPS] on POR...
  23. Replies
    17
    Views
    1,490

    Re: 18F45K40 Can't set PORTD.1

    I can't help thinking it's an RMW issue even though you're clearly using LAT instead of PORT registers.

    What happens if you try to toggle ONLY RX1LED?
    What happens if you change the order in...
  24. Replies
    17
    Views
    1,490

    Re: 18F45K40 Can't set PORTD.1

    Nice catch Richard!
    However, looking at the datasheet the ODCOND register defaults to $00 which is push/pull for all pins. Nothing in the errata either.

    Which datasheet are you looking at?

    I...
  25. Replies
    17
    Views
    1,490

    Re: 18F45K40 Can't set PORTD.1

    I don't think that would (or should) be a problem but you're the moderator :-)
    I'm afraid, I for one, can't help you without more information, actual code, produced assembly listings and what not...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4