Search Results - MEL PICBASIC Forum


Search:

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

Search: Search took 0.00 seconds.

  1. Re: Quickest way to get highest set bit on port in to a variable?

    It´s a PIC18F45K80
  2. Quickest way to get highest set bit on port in to a variable?

    Hi.
    I have eight sensors with digital output connected to a port and now I want to in the quickest way get only the highest set bit in to a variable.

    if port = 110000
    I want var = 000000

    if...
  3. Replies
    2
    Views
    2,188

    Initialize variables

    Hi.
    I use a PIC18F45K80 @ 64MHz.
    I have a seperate pbp file with my LCD menu code, witch I include at the end of my main code.
    In my menu file I declare some variables and initialize them.
    The...
  4. Replies
    4
    Views
    3,062

    Re: Setting latx instead of portx before trisx

    Thanks Henrik.
    Of cource it should be %00000000 to set as outputs, hjärnsläpp.
    I do like below @ 64mHz, but no capcitive load, and all A/Ds is off. I'll just use latx.
    porta.0 = 1
    porta.1 = 1...
  5. Replies
    4
    Views
    3,062

    Setting latx instead of portx before trisx

    Hi.
    To initialize my ports I have always done something like this:
    'set all pins on portb high
    portb = %11111111
    'set all pins on portb to outputs
    trisb = %11111111

    A couple of days ago I...
  6. Re: porta.0 and porta.2 only goes high with HIGH command with PIC18F45K80

    Setting the outputs with latx.x instead of portx.x solved the problem.
    Tanks.
  7. Re: porta.0 and porta.2 only goes high with HIGH command with PIC18F45K80

    After taking a quick look in the datasheet it seems like that coulld be it.
    I will test that tomorrow.
    Thanks.
  8. Re: porta.0 and porta.2 only goes high with HIGH command with PIC18F45K80

    Same thing again. So weird.
    TRISx, PORTx, ANCONx and ADCONx is like below in my code

    TRISA = %11100000 'porta direction 0=OUTPUT 1=INPUT
    PORTA = %00000000 ...
  9. Re: porta.0 and porta.2 only goes high with HIGH command with PIC18F45K80

    How weird, in the code everything is ok so it must have happened when I pasted the code.
    Here is the code again


    ' PIC18F45K80 Configuration Bit Settings


    #CONFIG
    CONFIG RETEN = OFF
    ...
  10. porta.0 and porta.2 only goes high with HIGH command with PIC18F45K80

    Hi.

    I have a problem that if I set porta.0 and portb.2 high with porta.0=1 and porta.2=1 then they will not go high, but if I do HIGH porta.0 and HIGH porta.2 then they will.
    porta.1 and porta.3...
  11. Replies
    3
    Views
    4,792

    Re: PIC18F45K80 runs way to fast.

    Thank you very much, now it works.
  12. Replies
    3
    Views
    4,792

    PIC18F45K80 runs way to fast.

    Hi.

    Im using the PIC18F45K80 for the very first time and use a 64MHz external clock source.
    To test the new hardware, and to see that it's alive, I just blinks en LED.
    The example blinks the LED...
Results 1 to 12 of 12