Search:

Type: Posts; User: barak

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds; generated 11 minute(s) ago.

  1. Replies
    4
    Views
    5

    Re: What Devices Does Proton Support?

    http://www.protonbasic.co.uk/content.php/1878
  2. Re: Help, I need use USB with internal oscillator INTOSCIO in 18F25K20

    What version are you using? For me version 3.5.9.3 fixed this problem
  3. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    tic = 1/64 * 4 * 256 = 16uS
    period 1 Sec
    Required timer value 2^16 - (period / tic) = 65536 - 62500 = 3036

    The max. period possible at this clock speed with the prescaler at 256 is 1.048576 Sec...
  4. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    OK here is a working hardware tested code. All you have to change is device (I only had 25K22) and the number of seconds you want for the LED to turn on (I have it on 10 seconds as I'm not patient...
  5. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    I'll try it and let you know
  6. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    Sure he will need that and possibly interrupt priority. I'm assuming he will define all the standard items and configure the device. Its just a timer 0 example taken out of working code but is was...
  7. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    '----------------------------------------------
    ' example for 18F4xK22 Timer 0
    ' interrupt every 1 sec at FOS 64MHz
    ' every 60 seconds, turn on a LED for 1 second...
  8. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    In this clock speed there is no way to get a timer to do 1 minute! The maximum possible timer period is 1.04858 Second at prescaler = 1:256.
    If you want 60 seconds you need to count 60, 1 second...
  9. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    His code is for 16f and he wants to know how to run tmr0 on 18f which does not use the option reg
  10. Replies
    20
    Views
    534

    Re: Using TMR0 with PIC 18F26K22

    What is the osc speed in your application?
  11. Re: New Project _ Source Meter and measuring small currents

    I'm assuming it is an adjustable power supply. On the display you show the voltage after the sense resistor. This has to be this way because this is the actual voltage going to the load. You don't...
  12. Re: New Project _ Source Meter and measuring small currents

    If you have a high side circuit, why do you care about the voltage drop? The voltage drop is an issue with low side current sense because of the difference to real ground but it is not an issue with...
  13. Re: New Project _ Source Meter and measuring small currents

    177 or 197A. There is a risk they will not work well because they are so old but I think its worth it barbecue when they are in good shape they are so accurate.
  14. Re: New Project _ Source Meter and measuring small currents

    Because it is a high side circuit for low load, you can use much higher resistance for your max. load. you don't need miliohm resistance. Even 1 ohm will give you enough current for a few hundred mA....
  15. Re: New Project _ Source Meter and measuring small currents

    The ADC is not as critical. You need an Integrated Differential Amplifier https://www.maximintegrated.com/en/app-notes/index.mvp/id/746
  16. Replies
    9
    Views
    231

    Re: COUNTER command on an SFR bit

    How often do you need to know if > 5KHz? If you can use a "window", use a timer with an interrupt and an interrupt "counter" on the comparator as suggested before. the counter is byte size. If the...
  17. Replies
    5
    Views
    284

    Re: Using harware SPI

    Correct. As soon as you put data in the buffer (SSBUF) it is being clocked out and "simultaneously" the data from the slave is clocked into the buffer.
  18. Replies
    5
    Views
    284

    Re: Using harware SPI

    Example:


    SPI_WR:
    Pop SSPBUF
    While SSPIF = 0 : Wend ' wait for end of transaction
    SSPIF = 0 ' clear the SSP flag
    Return SSPBUF

    yourcode:
  19. Replies
    11
    Views
    619

    Re: Waveform generator

    The screen shots are with the DDS code I posted with a very simple 2nd order RC LPF. The sines are nice and frequency very accurate. After measuring i realized my table was almost full scale and that...
  20. Replies
    11
    Views
    619

    Re: Waveform generator

    I got some screen shots with FFT from the scope that show 100Hz, 1KHz and 10KHz that will give you an idea of the harmonic distortions. See attached. The red line is the FFT with markers on the...
  21. Replies
    11
    Views
    619

    Re: Waveform generator

    This is one of the most confusing title to an AN. Per page 6 their solution is: "Thesquare wave output from the NCO can be passedthrough a Band Pass Filter with a high Q factor togenerate a sine wave...
  22. Replies
    11
    Views
    619

    Re: Waveform generator

    If you can use a square wave, I think the best hardware on a PIC is NCO. See http://www.protonbasic.co.uk/showthread.php/66605-NCO-to-forum?p=506132&viewfull=1#post506132
  23. Replies
    11
    Views
    619

    Re: Waveform generator

    Try the attached. It uses 18F23K20 to generat sine waves. Needs a LPF on the PWM output
  24. Replies
    23
    Views
    1,334

    Re: Runtime symbol or variable assignment

    why not just save a few lines and do:


    Select POSITION
    Case 1
    High = porta.0
    Low = porte.0
    High = porte.1
    Case 2
    High = porta.1
  25. Replies
    23
    Views
    1,334

    Re: Runtime symbol or variable assignment

    take a look at the code I posted below. Very quick, don't need conditional code.
  26. Replies
    23
    Views
    1,334

    Re: Runtime symbol or variable assignment

    Try this:


    Pin_Output = 1
    Pin_Output = Pin_Output << (POSITION - 1)
    PORTA = PORTA & 0xF8 ' PORTA[2:0] = 0
    PORTA = PORTA | Pin_Output
  27. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    I used Fontconverter.exe but can't remember where I got it from and how it works (too old)
  28. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    It does not appear relater to the solution on this thread
  29. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    My fault. I did some tests with 18F45K20 so I commented the original sub (see in code below) and forgot to change it to 'Pop SSP1BUF' . The compiler is forgiving and permits 'SSPBUF' although...
  30. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    Why did you define SI and SK? If using the MSSP it is not needed.
    The SPI sub should be changed to send the buffer of MSSP2:

    SPI_GLOBAL: ' generic SPI sub ...
  31. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    Sorry, I thought you are using 46K22. The 81F26K22 is OK and the code should work.
    So on the 26K22 you have the LCD connected to MSSP2.
    I noticed you have a keypad on port B but also using it for...
  32. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    If the SD card is Using SPI, you can use the same MOSI and SCK for both the SDCard and the LCD. Unless you pull down the Chip Select (CS1B on the LCD), the device will ignore the communications. Even...
  33. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    the code at http://www.protonbasic.co.uk/attachment.php?attachmentid=3145&d=1476265849 is for PIC18F46K22 but it is using the MSSP1 module for SPI. Therefore you must connect SDO1 on RC5 and SCK1 on...
  34. Replies
    53
    Views
    10,273

    Re: SPI GLCD Help needed

    Hard to tell without knowing what hardware you are using: PIC? LCD?
  35. Replies
    8
    Views
    812

    Re: Wireless alarm devices Home ...?

    Good idea!
Results 1 to 35 of 100
Page 1 of 3 1 2 3