Search Results - Proton BASIC community web site


Search:

Type: Posts; User: John Drew

Page 1 of 5 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    22
    Views
    693

    Re: PID using integer math.

    To save variable space use only global Temp variables then keep their range limited to within a subroutine for internal calculations. You can then re-use the same Temp variable in many sub routines....
  2. Replies
    13
    Views
    360

    Re: Mosfet vers Transistor drive issue

    Hi Tim,
    I almost always used Ken's approach and low side switching with an NPN transistor. Never had any problems and it's so simple. Resistor from the PIC gate, ground the emitter and use the...
  3. Replies
    22
    Views
    693

    Re: PID using integer math.

    Don't be afraid to use floating point. FP maths is sufficiently accurate for many applications and is very easy to use in Proton. Unless you're dealing with a tiny device at very low speed use FP if...
  4. Replies
    13
    Views
    360

    Re: Mosfet vers Transistor drive issue

    I agree the logic level mosfets are the way to go. I didn't realise that transistor was self biased with internal resistors. That transistor may be OK in an amp but not in switching mode.
    John
  5. Replies
    13
    Views
    360

    Re: Mosfet vers Transistor drive issue

    How hard are you driving it Tim? You need to be saturating the device to get 60mA. What does the output look like on a CRO?
    I'd be using a 470-1000 ohm resistor from the PWM of the PIC to push it...
  6. Replies
    7
    Views
    296

    Re: Missing samples folder

    Teo, there is a small, free search program called "Everything". It will find any file/folder very quickly. I've used it for many years and it's the first program I download and install on a new...
  7. Re: Proton24 Compiler. Anomaly correcting update.

    Thanks Les,
    Downloaded and installed, all sweet.
    John
  8. Replies
    30
    Views
    1,601

    Re: Lost my dongle after 16 years!!

    Hi Shantanu I tried to send you a PM but your mailbox is full.
    John
  9. Replies
    30
    Views
    1,601

    Re: Lost my dongle after 16 years!!

    Upgrade to the newest version and no dongle needed.
    John
  10. Replies
    9
    Views
    352

    Re: Merry Christmas and Happy New Year

    Merry Christmas to all and a happier, safer New Year.
    John
    In South Australia
  11. Replies
    6
    Views
    370

    Re: Tunnel Diodes Yeyyyy!!!!

    Wow, tell us when you make something Les.
    All the best
    John
  12. Re: Proton and Proton24 Compilers. Anomaly correcting update.

    Hi Les,
    Upgraded nicely and kept my registration. Thanks.
    John
  13. Replies
    8
    Views
    451

    Re: Pulling power from a RS232 port

    I see what you mean, you would have been stuck with the added complexity of using the negative voltage from the rs232. A pity as it would have been nice not to use a battery and a switch. If it was a...
  14. Replies
    8
    Views
    451

    Re: Pulling power from a RS232 port

    re the data Tim, I have successfully used a limiting resistor and a diode to keep the negative volts out, can't remember the value, maybe 10K. I relied on the inbuilt zener diode that protects most...
  15. Replies
    6
    Views
    1,024

    Re: Problem with ISIS distribute with Proton

    Spoke too soon. Runs OK on laptop with ProtonIDE as admin (W10 home) 64 bit. When I go to my backup computer (W10 pro 32 bit) ISIS works if I put the bas file on a USB and compile it. If I try to run...
  16. Replies
    6
    Views
    1,024

    Re: Problem with ISIS distribute with Proton

    G'day Bob,
    Thanks for the suggestion but couldn't get that to work BUT I decided to run the IDE as Administrator and amazingly ISIS no longer complained and worked.
    It was a long shot and I have no...
  17. Replies
    6
    Views
    1,024

    Re: Problem with ISIS distribute with Proton

    Thanks for the reply Les.
    Even if my final choice of micro is different I often use one of the supported boards to check calculations. I do a lot of work using maths so I don't care which processor...
  18. Replies
    6
    Views
    1,024

    Problem with ISIS distribute with Proton

    Greetings all,
    Has anyone else had problems with ISIS loading the BAS file as part of the load sequence.
    I'm getting an error message if I attempt to run a simple PIC16F628A program from my...
  19. Re: Any boffins know about moving water with an electromagnetic field?

    Hi Tim,
    All noted. Reading your posts I can see it is a very complicated problem. Knowing you, if you haven't solved it after 15 years it's not as simple as I suggested, but it is a great brain...
  20. Re: Any boffins know about moving water with an electromagnetic field?

    G'day all,
    Tim, is the level of water in the steam enough to measure opacity? As you know steam is invisible and it's the presence of water drops that lets us see it - we call it steam when we see a...
  21. Replies
    4
    Views
    444

    Re: 4 Byte floats to 2 byte floats

    Do you code the receiving end too?
    If so I'd simply multiply your float by 10, assign to a sWord, send and decode in the opposite way on the receiving end.
    But I know you would have thought of that...
  22. Re: how to use I2C and 2nd I2C built in peripherals?

    G'day Kai,
    It would have been better to put it in the Proton 24 section. It helps people find it in future.
    I'm not able to move it.
    All the best
    John
  23. Re: how to use I2C and 2nd I2C built in peripherals?

    Kai,
    When posting try to use the best section of the Forum. That way we'll find things in future.
    Most of us will always see a post no matter where you post because we use the What's New button at...
  24. Re: johngb has just uploaded Proton Studio 2.0.1.9 update!

    Like Joseph I've been doing other things including major repairs to my satellite antennas. About to get back into my work with a graphic display. So I'll be again using PS. It's fairly complex...
  25. Replies
    1
    Views
    396

    Re: HRSIN/OUT & RSIN/OUT shared usage.

    A very interesting strategy. Most of us have come against too few ports.
    The information is worth putting on the WIKI as it will get lost over time in the forum.
    John
  26. Replies
    7
    Views
    1,236

    Re: Program not moving to next function

    Somewhere in the WIKI is an interrupt driven buffer for serial. Let me know if you can't find it as I have it on my computer. Right now I'm using my phone.
    John
  27. Replies
    30
    Views
    5,070

    Re: Using the EWrite command

    I agree with Joseph about the delay.
    Just put delayms 1000 as the first item in your code. That should fix it. Personally I'd put a 5V regulator in the Vdd and suitably bypassed, they are good at...
  28. Re: forum obsolete - no more compiler updates here?

    Good idea Les, we've had it too good for too long at your expense. I'm happy to pay for new features.
    John
  29. Replies
    30
    Views
    5,070

    Re: Using the EWrite command

    I always do, but it may pay to look at the ASM, it's possible that the compiler does it for you.
    John
  30. Replies
    10
    Views
    1,302

    Re: Dimmer with a 12f675

    Do you have a resistor between the diodes and the zener? Even if you have a resistor this is a very basic power supply. There would be quite a lot of ripple. Zener diodes are far from perfect...
  31. Replies
    26
    Views
    1,847

    Re: Device PIC18F47K40 Keeps starting

    That's good news. Glad you found a fix to the problem. I also saw that you had the WDT set to off, so it should have been OK. Oh well, it looks as if there is a special "feature" in that device that...
  32. Replies
    8
    Views
    925

    Re: Serial reception.

    G'day Flosi,
    Here's some excerpts from a working program that uses a slave I2C for monitoring data sent from a master device.



    OSCCON = 111100 'set the internal oscilator to 8MHz...
  33. Replies
    26
    Views
    1,847

    Re: Device PIC18F47K40 Keeps starting

    Sounds to be a tough one.
    As a first step I'd pull up the MCLR pin to Vdd and declare MCLR as on. Just in case there's something funny about the following line that I don't understand (I don't know...
  34. Replies
    8
    Views
    925

    Re: Serial reception.

    Here's an example from one of my programs. It may or may not be useful but it works communicating with another PIC about 50M away using 9600baud with TTL levels, amazing. I tested it with a 100m...
  35. Replies
    8
    Views
    925

    Re: Serial reception.

    Greetings Flosi,
    I have used both, I'm using my phone at 22:15.
    Tomorrow is a busy day but Friday I'll send some settings. Which micro are you using?
    By the way I'm having success with your and...
  36. Replies
    9
    Views
    2,100

    Re: problem with Interrupt and MCLR 18F4550

    Hello,
    Try removing the line "goto main" from the interrupt routine. That is the main cause of your problem.
    Cheers
    John
  37. Replies
    8
    Views
    925

    Re: Serial reception.

    Hello Flosi,
    Are you using hardware or software?
    In my experience the usual problem is polarity. I suppose you've an inverter if EUSART or alternate polarity in a software solution?
    John

    If...
  38. Replies
    9
    Views
    2,100

    Re: problem with Interrupt and MCLR 18F4550

    Hello,
    It is not a good idea to use CLS, or a print statement in an interrupt routine.
    Also you should not use a goto outside the routine. By doing this you bypass the context restore. All sorts...
  39. Poll: Re: About deleting accounts due to inactivity beyond three months.

    If it means membership without ads I'll pay a yearly fee.
    John
  40. Poll: Re: About deleting accounts due to inactivity beyond three months.

    I think the series of email warnings should cover it.
    John
  41. Poll: Re: About deleting accounts due to inactivity beyond three months.

    I agree with many of Stephen's comments.
    For some time I was a moderator and tried to help out by deleting spam requests for access. There were so many it was pretty well impossible job to keep up....
  42. Replies
    9
    Views
    1,354

    Re: Fletcher 16 Checksum routine

    Sounds good Peter, I think you've covered all bases.

    John
  43. Replies
    9
    Views
    1,354

    Re: Fletcher 16 Checksum routine

    That's an interesting scenario Peter and shows up the weakness of the Fletcher system. It seems that they all have potential weaknesses. I think (but don't know) by combining the two ideas it should...
  44. Replies
    1
    Views
    464

    [OFFER] Re: 2 Microstick II boards going free

    Hi Bob, I used the Microstick and it was a piece of cake through USB connection and the Microstick setting in programmer tab. I didn't bother with the included loader in the micro. I was really...
  45. Replies
    9
    Views
    1,354

    Re: Fletcher 16 Checksum routine

    G'day Peter,
    I've had a quick look at the Wikipedia article. I think you've got the calculation about right.
    So when you receive the bytes (Excluding the checksum) you repeat the calculation and...
  46. Re: Software solution to the flickering LED problem

    Hi Sebastian,
    Here's an example of a subroutine that brings in the value from the A/D and provides an average.
    There are many different ways to do this but I have written it without adding any new...
  47. Re: Software solution to the flickering LED problem

    Hi Sebastian,
    Whenever I use an A/D I use a simple averaging routine.
    When I'm by my computer later I'll write one for you.
    John
  48. Re: Software solution to the flickering LED problem

    Seba,
    Charlie is correct.
    Here's a little more information
    When you use Gosub Somewhere, the compiler puts the current address of the program in special memory called a stack. The program then...
  49. Replies
    8
    Views
    1,052

    Re: Happy birthday Rick (rcurl)

    I'm a lot happier celebrating a birthday than I was when 60. It means another year of looking down on the daisies rather than helping push them up :)
    John
  50. Replies
    8
    Views
    1,052

    Re: Happy birthday Rick (rcurl)

    Happy birthday Rick
    John
  51. Replies
    13
    Views
    2,076

    Re: dsPIC33 can't get USART to receive

    Charlie, may I suggest Silicon Chip Magazine.
    It has a worldwide audience and people would enjoy information about the Elliot and the emulator especially in the context of the museum.
    John
  52. Replies
    13
    Views
    2,616

    Re: Fast and compact driver for 1306 ILED

    G'day Flosi,
    Although there is a promote to article button I'm not sure where it ends up.
    Better to create the article in the WIKI in the best spot and slip in an extra line with your...
  53. Replies
    13
    Views
    2,616

    Re: Fast and compact driver for 1306 ILED

    Thanks Flosi and procedures make it much easier to read and understand. I'll use it. Thanks to Dompie too for his ground work.
    John
  54. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    More than one way to skin a cat Joseph. Another interesting solution.
    John
  55. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    Thanks for the further explanation Les. As a user I know how to implement bRef but I didn't know what happened under the hood. So now I know there is an overhead in using bRef and what it involves....
  56. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    Helpful information Les, thanks. I'm familiar with Delphi's use of pointers but haven't used in Proton to date.
    John
  57. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    Les, is it a speed reason you use bRef to pass a value?
    If so I will start using that approach, I'm assuming it means you don't have to copy into a new variable.
    I'm looking forward to your new...
  58. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    I'd just check the first character with comment count 3. If it is a "-" then Value = 0-Value to give you the negative value. If it's not a "-" then skip the subtraction.

    John.
  59. Replies
    4
    Views
    841

    Re: Keep track of time while you sleep

    Hi Tim, there are pics that have internal clocks that use an external 32kHz crystal and run during sleep at very low currents.
    I'm on my phone so hard to research for you.
    John
  60. Replies
    85
    Views
    7,570

    Re: Proton Studio Version 2

    I agree, I just thought that 32 bit programs went in the PF(X86) directory and 64 bit in PF.
    I don't fully understand that division of directories and why it's necessary. I'm sure there's a reason...
  61. Replies
    85
    Views
    7,570

    Re: Proton Studio Version 2

    John,
    As you are storing in Program Files does this mean you are compiling for 64 bit?
    John
  62. Replies
    22
    Views
    4,225

    Re: SPI with 2 slaves, GLCD and MAX147

    Broderic,
    By putting a CLS before each print you will get flickering of the screen.
    John
  63. Replies
    14
    Views
    1,752

    Re: FFT_Tone_Decoder for LEDs

    Good morning Les,
    The NE567 was used in my first repeater controller with a 2 pole, opamp based, Butterworth Filter. It has several limitations.

    1) It takes a while for the frequency to stabilise...
  64. Replies
    14
    Views
    1,752

    Re: FFT_Tone_Decoder for LEDs

    Les, it's becoming difficult to buy CTCSS decoder chips. Commonly we need to decode a continuous stream of e.g 91.5Hz tone accompanied by speech.
    Do you think your code could do that?
    CTCSS is used...
  65. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    That is really nifty Les. I hadn't thought of that approach and it is so much simpler than multiplying by powers of 16. Your approach would be so much faster without the maths.
    Thanks,
    John
  66. Replies
    22
    Views
    4,225

    Re: SPI with 2 slaves, GLCD and MAX147

    That is strange Broderick. Normally all is well with the Print function.
    It seems to me that your LCD is not a standard device and has different cursor commands. Another thought is that you are...
  67. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    I think you're right Les.
    I haven't come across any device that outputs a float.
    More info on the device would be helpful.
    John
  68. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    OK, I gather it's just a dword so in that case it's fairly straight forward, much as Norm said and your latest example.
    In your earlier post you implied you were receiving a float variable and you...
  69. Replies
    29
    Views
    2,688

    Re: 4 Hex values to decimal float

    I don't have enough information.
    Are each of the values in place order? Where is the mantissa? I'm assuming it's in the first zero.
    Les, has some info in the manual on the structure of floats.
    Is...
  70. Replies
    16
    Views
    2,324

    Re: Reason of GoTo after $ifndef

    Good morning Les,
    I didn't explain myself well enough. It's not the the numerator I was talking about, it was the denominator. The X in the formula. Zero in the numerator is not a problem, as you...
  71. Replies
    16
    Views
    2,324

    Re: Reason of GoTo after $ifndef

    Hello Les,
    Thanks for the explanation on the two results, I suspected something like that but my knowledge wasn't up to it.
    The maths behind the ATAN2 routine aren't mine. I found the principle...
  72. Replies
    16
    Views
    2,324

    Re: Reason of GoTo after $ifndef

    Error in opening comment:

    Should read "Surprisingly I don't need to test for X=0". I don't get a divide by zero error.
    John
  73. Replies
    16
    Views
    2,324

    Re: Reason of GoTo after $ifndef

    Hello everyone,
    Here's a program that runs in ISIS using more maths and so I think it will be slower than Les's code.
    Surprisingly I don't need to test for Y=0, it seems to resolve quite well....
  74. Replies
    16
    Views
    2,324

    Re: Reason of GoTo after $ifndef

    Hello Les,
    I don't understand this bit of the ATAN2 code.


    Else
    Result = PP_AARG / PP_BARG
    Result = ATan(PP_AARG)

    It seems as if the first value for Result is overwritten by the...
  75. Replies
    85
    Views
    7,570

    Re: Proton Studio Version 2

    Personally I don't want delete to work on a whole line. For me <ctr>Y is quick enough. In my book del and bs are one character moves. If you do add the whole line del please make it configurable....
  76. Replies
    16
    Views
    2,324

    Re: Reason of GoTo after $ifndef

    Broderick, I find it hard to understand routines like the one you are showing and I've been programming for years. It is not a program, it is something that is used to do something inside a program....
  77. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim, I am moving the calibration up or down the curve a little. This will create increasing errors but I'm not really sure the magnitude of these. If the correction is tiny then I think the results...
  78. Replies
    13
    Views
    2,185

    Re: Problem in storing values to eeprom

    Hello Amod,
    Keytapper makes a good point. Using subroutines or procedures that describe what each piece of code does is much easier to read.
    At present you are using what is called string code...
  79. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim,
    I've had a good look through the datasheet. Providing the actual calibration shift is only small it seems that the correction routine I suggest should work reasonably well. I'm assuming that...
  80. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    @Les Thanks, the compiler makes it so easy to use all sorts of maths.

    @Tim all understood. If there is a likelihood of drift in the sensor then my solution is probably the way to go, but if the...
  81. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Hi Tim,
    All understood. You know far more than me about that kind of thing. Maths is a bit more my thing, but it's not as easy as it used to be. Too many neurons no longer active :)

    In this case...
  82. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Hi Tim,
    OK, I think I have it now.
    The question is really about the A/D and getting that to represent the resistance values coming out of the MAX chip and developing a formula for this conversion...
  83. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Hi Tim, I'll look at the data sheet again and you description of your issue. I need to be clearer about what you're looking to do.
    On my phone at present. Not the best for exploring datasheets or...
  84. Replies
    13
    Views
    1,278

    Re: Resistor divider madness

    A little App for Android users. "Electrodroid". Lots of useful calculators including one for voltage dividers.
    John
  85. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim, I've written an article for the WIKI but waiting for it to be published. In the short term here is the program using procedures.
    John



    (* test program for the MAX31865 resistance to...
  86. Replies
    3
    Views
    685

    Re: Nooploop TOFsense Distance Sensor

    Thanks Rick,
    I had a look at the modules. I don't think either would do the job. Accuracy wouldn't be tight enough although it's comparative distance that matters in bowls. I'm not sure whether a...
  87. Replies
    3
    Views
    685

    Re: Nooploop TOFsense Distance Sensor

    Rick, what kind of accuracy.
    I play lawn bowls and relative distance measuring is done with a metal or string tape. It requires a steady hand, the opposition don't like it if you move the Jack or...
  88. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    G'day Tim,
    I'm glad I was able to help. Your thanks is plenty. We're on this forum to help each other.
    I enjoyed solving the problem and was a bit surprised that the 32bit floats worked so well....
  89. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim, although you may not choose to use it I have a simple solution for you with regard to solving the temperature in Callendar-Van Dusen equation for the MAX31865. There's a bit of maths but I think...
  90. Replies
    68
    Views
    7,215

    Re: Positron and Positron16 dev boards

    Les, when you go looking for a new car be wary of any of the early dual clutch "automatics". Manual or torque converter automatics are much more reliable in the not so new vehicles.
    John
  91. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Hi Tim, all understood.
    Another solution that may be better for you is to do more in the calibration routine.
    Once you have entered the temperature and read the resistance use the formula to...
  92. Replies
    85
    Views
    7,570

    Re: Proton Studio Version 2

    John, you might recall you had a problem with cursor down key causing a similar issue and you fixed it. Maybe you missed it in the pagedown and can use the same solution.
    John
  93. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim, you can't just shift the calibration point. Have a look at the sample table on page 20 (Probably you got your table from there), the device is not linear and just shifting the calibration point...
  94. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    All noted Tim.
    My code at this point is all about the reverse lookup. I've been thinking about how I can do it using integers. The main obstacle is the nature of the constants specifically "a" and...
  95. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    G'day Tim,
    I have it working in Pascal although at this stage using 64 bit floats. I am using iteration to solve the equation in the datasheet. I have yet to test my method with 32 bit floats. It...
  96. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim, I'm making progress, but a little trickier than I thought but do-able. Datasheet has been essential.
    John
  97. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    Tim, I'll have a look at the device and see if I can help with a formula. But if it's just a table problem at 0deg then just a bit of extrapolation would possibly be sufficient.
    I'll need the data...
  98. Replies
    3
    Views
    1,261

    Re: Adin Problem, PIC16F753

    Keytapper, that's a forum issue not a user issue. The forum removes them if you edit.
    John
  99. Replies
    41
    Views
    3,295

    Re: Calibration zero span UI options

    When dealing with non linear devices, and many are, I do as many measurements as I can then use excel to plot the graph and then ask it to create a matching curve that can be described by a second or...
  100. Replies
    8
    Views
    1,001

    Re: Unix time conversion

    Happy to help, there are a few minor typos, but they are unimportant. A couple of unnecessary brackets and comments left over from my test 18F452 example.
    By starting with Delphi I could track...
  101. Replies
    8
    Views
    1,001

    Re: Unix time conversion

    Hi Gamboa,
    I weakened. I redrafted to Proton. It's fairly simple, but you'll need to strip the date/time string to get the values out to the variables - dWord are big enough. I haven't done that...
  102. Replies
    8
    Views
    1,001

    Re: Unix time conversion

    Hi Gamboa,
    I haven't done the calc in BASIC but this is a routine I wrote in Pascal this morning to do it.
    It checks out with on line calculators. I think it's fairly straight forward translating...
  103. Replies
    8
    Views
    1,001

    Re: Unix time conversion

    Just did some quick calculations on my calculator. It's just seconds in Unix time. The bit you don't understand is getting the modulus of years to determine leap years for extra days. Just off the...
  104. Replies
    8
    Views
    1,001

    Re: Unix time conversion

    G'day Gamboa, I reckon I could have a go at that tomorrow. It's late here and I'm using my phone.
    It appears as if it's 1/100 of secs from 1-1-1970.
    John
  105. Replies
    22
    Views
    2,737

    Re: RAM size of 24EP512GP806

    G'day Charlie,
    If there is a likelihood of a divide by zero I replace the possible zero with a tiny value.

    This is important when solving Kepler's equation where I start with an approximate value...
  106. Replies
    22
    Views
    2,737

    Re: RAM size of 24EP512GP806

    Charlie, I have tested 64 bit maths extensively. I converted my moon location program from 32 bit floats in an 18f4685 to a pic24fj128gp502 using 64 bit floats. It used pretty well every trig and...
  107. Re: Proton and MplabX Ide 5.1 and debug Pickit 3

    I find MPLAB 8.92 is as good as any.
    John
  108. Thread: Testing

    by John Drew
    Replies
    0
    Views
    880

    Testing

    Just a test of the forum
    John
  109. Replies
    12
    Views
    1,923

    Re: Compiling error on Weather station code

    Nice simple solution Broderic. Glad you solved it.

    John
  110. Replies
    20
    Views
    3,511

    Re: What does this AS ERROR tells me?

    There are some very clever people on this forum. Great stuff BaSparky.
    John
  111. Re: How to replace another value without flicker

    Ab,
    It seems that you may be clearing the screen in between print statements. I don't do that. I either write a whole line or using the print coordinates just print over the same space. This last...
  112. Replies
    12
    Views
    1,923

    Re: Compiling error on Weather station code

    Download the datasheet for the AS5040 or AS5045. These devices are capable of giving fractional degree locations over 360 degrees and at quite high RPM.
    Here's an extract from the introduction to...
  113. Replies
    20
    Views
    3,511

    Re: What does this AS ERROR tells me?

    Maybe this is an opportunity to try Les's new long variables and save 1/4 of the space?
    John
  114. Replies
    12
    Views
    1,923

    Re: Compiling error on Weather station code

    I still have the code.
    John
  115. Replies
    4
    Views
    692

    Re: Happy Birthday Joseph (Joesaliba)

    Happy birthday Joseph.
    Best wishes
    John
  116. Replies
    12
    Views
    1,923

    Re: Compiling error on Weather station code

    A couple of chips that I've used are the 10 bit AS5040 and the 12 bit AS5045.
    Both need a bipolar magnet.
    Alternatively you can buy read made encoders such as the HH-12. They talk via SSI. Easy to...
  117. Replies
    7
    Views
    4,132

    Re: Add Crystal Doesn't Work

    Abinz,
    Find "Declare xtal" in the manual.
    For a start you don't put MHz after it.
    John
  118. Replies
    68
    Views
    7,215

    Re: Positron and Positron16 dev boards

    Les, I'll prepay for a Positron 16.
    Sounds terrific, The idea of having something really fast for my moon tracking would be great.
    John
  119. Re: Port Expander reading 16 inputs with debouncing

    G'day John,
    I used a mcp23017 on an external keypad and LCD. It worked fine via a DIN plug and two feet of wire via i2c. I know that is a stretch for i2c but worked perfectly. However it put more...
  120. Replies
    8
    Views
    1,194

    Re: How many colums you like your source?

    @Les: Beta versus VHS was a classic example. Beta had by far the better tape transport system and generally superior however marketing and film distribution decided the winner.
    @ Keytapper: I...
  121. Re: Serial bus decoder/driver for multiple RC servo/PWM outputs.

    David, somewhere on the forum there is a process to dodge the rollover issue in the timer.
    Does anyone else remember this?
    John
    On my phone, not good for research.
  122. Replies
    8
    Views
    1,194

    Re: How many colums you like your source?

    Joseph, I enjoy watching my non technical friends faces when I drag a window from one monitor to another. It does test some applications that don't resize correctly because of the different...
  123. Replies
    30
    Views
    2,882

    Re: Pulse width detection circuit

    Hi Tim,
    A bit more complex than David's but here's my code that obtains a number from 0-4096 from an antenna encoder that is converted to 0-360 degrees.
    The code contains extra bits because of this...
  124. Replies
    30
    Views
    2,882

    Re: Pulse width detection circuit

    I based mine on a Microchip application note. Time for the cot here it's 11:00 PM.
    Will send in the morning.
    John
  125. Replies
    30
    Views
    2,882

    Re: Pulse width detection circuit

    Tim, I have routine to measure pulse width. I use it to measure a PWM signal from an angular encoder. On my phone at present after evening meal. I'll post it tomorrow.
    John
  126. Re: Store a 2 digit or 3 digit number from a keypad in a variable

    Broderick,
    Dim Number[3] as byte
    Do you mean
    Dim Number as byte
    I've never seen a variable creation like yours.
    I'm not near a computer to check the help file.
    John
  127. Re: Store a 2 digit or 3 digit number from a keypad in a variable

    That was good timing Les, I was about to work on a procedure to do that. Now what will I do with the saved time!
    Cheers
    John
  128. Replies
    2
    Views
    759

    Re: Hbusout and Busin

    Thanks Les, that sorts things out for me. I'm running at 32MHz and with slow_bus on. So far so good. In fact it's amazing it works so well. No noticeable slowing of the other tasks but keeping data...
  129. Replies
    2
    Views
    759

    Hbusout and Busin

    Question: Can anyone tell me if when running a hardware interrupt for another purpose whether I need to turn off interrupts when using the software Busout/Bus.
    John
  130. Replies
    10
    Views
    1,725

    Re: Software PWM with PIC

    Hello Broderick,
    Optimisation of 16F devices may cause problems. First get the program running without optimisation.
    Once it is working consider adding low levels of optimisation if need be.
    John
  131. Replies
    19
    Views
    2,349

    Re: Decimal part from a Float

    Teo, would you show us how each of your variables are defined?
  132. Replies
    19
    Views
    2,349

    Re: Decimal part from a Float

    Teo, it doesn't matter how many numbers after the decimal point. Just multiply and divide by the maximum you'll need.
    E.g if the maximum is 3 then use 1000, if 4 then use 10000.
    You'll just have to...
  133. Replies
    19
    Views
    2,349

    Re: Decimal part from a Float

    Teo,
    Look up fRound in the manual.
    For some more info on maths especially the limitations of floats and using integers in their place have a look at this article I wrote a few years back...
  134. Replies
    19
    Views
    2,349

    Re: Decimal part from a Float

    Here was my similar solution:


    John

    Good one Bob, that's the simplest. There's many ways of doing this. Bob's answer does give a float, you might prefer an integer result.
  135. Replies
    26
    Views
    2,844

    Re: Coronavirus Alert!!

    Spot on Stephen, humour helps us cope.
    John
  136. Replies
    14
    Views
    2,114

    Re: RTC accuracy and settings

    Another option is to put a small trimming variable cap in place of one of the fixed caps. Standard practice in ham radios in the good old days when we used crystals.
    John
  137. Replies
    7
    Views
    1,393

    Re: Preventing a byte rollover

    Has to be 255-X.
    If X was zero we couldn't load 256.
    I always have to think twice on that one Tim.
    John
  138. Replies
    17
    Views
    2,031

    Re: Why would anybody buy anything from Apple.

    Interesting comment on file Explorer See_mos.
    I have that trouble and I thought it was my inability to set up a network properly. Sometimes it locks me out for a non existent password....
  139. Thread: Versioning

    by John Drew
    Replies
    20
    Views
    2,632

    Re: Versioning

    In addition to Les's comments I usually write the version number to edata. I can access this either on a menu or by remote command. A read of the micro also works.
    John
  140. Replies
    60
    Views
    8,920

    Re: Driver for ILI9341

    Fair enough Flosi, it is an amazing piece of work and will save a lot of us headaches trying to work it out for ourselves.
    Looking forward to the new developments in due course.
    John
  141. Replies
    60
    Views
    8,920

    Re: Driver for ILI9341

    That's fantastic Flosi.
    Would you consider making it a WIKI entry so we don't lose track of it in future?
    John
  142. Replies
    7
    Views
    1,048

    Re: PIC 18F47K40 ADC - HELP Please?

    Hi Craig,
    A couple of things.
    Using PICconfigurator is always a good way to make sure your fuses are set correctly.
    Secondly, it might be a typo but you say you set the sample time at 50ms. That's...
  143. Replies
    142
    Views
    13,768

    Re: Proton PIC BASIC Compiler - ADS7846 TouchScreen Controller Library

    Great, I know Charlie will be pleased too.
    John
  144. Replies
    142
    Views
    13,768

    Re: Proton BASIC Compiler - Software SPI interface to an ADS7846 touchscreen controll

    Flosi, knowing that running SPI for touch and display on the same SPI will slow things down, will your new code support that technique and accept the shortcomings for a non critical application?
    John
  145. Replies
    19
    Views
    2,803

    Re: error in lcd 16x2

    Does it print to LCD if you comment out the "Valor= ....." line?
    What version of the compiler are you using?
    John
  146. Re: Proton Compiler 24-bit Long Integer Variables to be added soon!

    Sounds great Les, especially down the track when you get the signed Long. I find the sword with only +/- 32k limiting.
    Thanks for your continuing work to make Proton even greater.
    John
  147. Replies
    9
    Views
    1,367

    Re: RF modules recomendations?

    Tim,
    Be aware that the range 420-450MHz is an amateur radio allocation. There may be transmitters outputting up to 1kW, especially around 432-433. There are also satellite transmissions between...
  148. Re: Something screwy about 16F88 OSCCON register

    On some projects, even though the ICSP pins are not shared, I find I have power up the board AND provide power through the pickit 3.
    John
  149. Replies
    18
    Views
    5,008

    Re: Interrupt and SHout problem

    Here are some thoughts on the interrupt routine showing how to use a flag.
    Print statements and loops checking things should be avoided.
    John



    'INTERRUPT================
    Isr_Handler:
    ...
  150. Replies
    18
    Views
    5,008

    Re: Interrupt and SHout problem

    Your interrupt routine is far too complex and will be taking too much time, especially as you have a waiting loop (while/wend).
    Interrupt routines should deal with essentials only.
    What you do is...
  151. Replies
    18
    Views
    5,008

    Re: Interrupt and SHout problem

    Run75
    I was able to get the % signs showing but not sure what your actual values were. You'll need to check. Welcome to the Forum.
    John
  152. Replies
    18
    Views
    5,008

    Re: Interrupt and SHout problem

    Run75, I have tidied things up for you and made use of Fuse Configurator (search on the forum for this) to set the fuses.
    Also, use comments to keep track of what you are doing. It is especially...
  153. Replies
    18
    Views
    5,008

    Re: Interrupt and SHout problem

    I'm using my phone at present and because you've lost the setting out it is very hard to follow. I'll put it in an editor tomorrow and see if I can adjust things. At this point it appears to be at...
  154. Replies
    18
    Views
    5,008

    Re: Interrupt and SHout problem

    One error is the "do" in line 5 of Main. It shouldn't be present. I'm surprised the compiler doesn't complain.
    John
  155. Replies
    16
    Views
    4,355

    Re: NEC Protocol IR remote control decoder

    I wish it was Charlie.
    16000km is a long way but it would be worth it. The UK versus Oz, I can see Les racing down the pitch to deliver a fast ball while Charlie wicket keeps, the UK users crouched...
  156. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    Great news Charlie. By the way I spotted a reference in Silicon Chip that suggested that when running two SPI devices from the same MSSP that it was necessary to reset the MSSP when changing chip...
  157. Replies
    10
    Views
    3,925

    Re: Problem receiving string

    Hi Bob,
    I much prefer using hardware so I can detect an interrupt and with the 1 byte buffer it is very unlikely to miss a character.
    Best wishes
    John
  158. Replies
    16
    Views
    4,355

    Re: NEC Protocol IR remote control decoder

    Nicely done AG.
    John
  159. Replies
    10
    Views
    3,925

    Re: Problem receiving string

    G'day Bob,
    I would have thought that lower baud rates would be less error prone than 119k.
    John
  160. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    Shows how little I know about precompiler directives. Your right Flosi.
    John
  161. Replies
    142
    Views
    13,768

    Re: Proton PIC BASIC Compiler - ADS7846 TouchScreen Controller Library

    Yes Flosi, and they take up a lot of space too. So I just include the fonts I need and even then keep them to a minimum of two.
    I've got the keypad working nicely.
    John
  162. Replies
    142
    Views
    13,768

    Re: Proton BASIC Compiler - Software SPI interface to an ADS7846 touchscreen controll

    Greetings all,
    Thanks Flosi, your and Les's code works and I now need to do the calibrating but at least I am getting results. Now to put my keyboard on the screen.
    In the long run I want to be...
  163. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    All noted Charlie,
    What I'll do is get touch going first with Les's code and light LEDs on the Amicus. Then I'll try switching the CS, then add the graphics.
    On phone at present. Bowls tomorrow. ...
  164. Replies
    142
    Views
    13,768

    Re: Proton PIC BASIC Compiler - ADS7846 TouchScreen Controller Library

    Charlie, I'm beginning to wonder if your displays without the chip supplied required something other than just the chip. I will take over the experimenting again as my displays came with the chip and...
  165. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    Les, thanks for the further explanation on the use of '$define cConstant" and 'Symbol'. I now fully understand.
    Re the 'hte' that is not so unusual. I do the same with 'the' and some other words....
  166. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    Thanks for the explanation Les, it was really helpful as were the earlier tips on using Touch.
    I am a bit inconsistent with my naming strategy and will in future bring my code into line with your...
  167. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    In Les's code he uses:
    $define ADS_SDO_Pin PORTC.5 ' SPI SDO to ADS7846 DIN (Uses the MSSP1 peripheral)
    $define ADS_SDI_Pin PORTC.4 ' SPI SDI from ADS7846...
  168. Replies
    24
    Views
    2,673

    Re: Flying drones

    Fanie, I've been told that it is not just something you do easily.
    It can be quite disorientating and can make some pilots feel sick. Apparently it requires practice when I would have imagined it...
  169. Replies
    24
    Views
    2,673

    Re: Flying drones

    Bloody hell Fanie, do you leap tall buildings too?
    John
  170. Replies
    6
    Views
    917

    Re: Happy New Year

    G'day Fanie,
    Yes, it's been b...... awful. I really feel for people who have lost everything. Last night there was smoke from the fires about 500 km to the east. Today is going to be 40 deg here in...
  171. Replies
    6
    Views
    917

    Re: Happy New Year

    Happy New Year everyone, may all your programs work first time and you and your families be healthy and happy.
    John
  172. Replies
    3
    Views
    664

    Re: Problem with LOADBIT

    Greetings Jean,
    Nice board. The 16F1827 fits in the same place as the PIC16F628 and you can use the internal oscillator in the 16F1827 instead of using the 3.5MHz clock from the MT8870 to run the...
  173. Re: PIC18F24Q10 interrupt serial routine with terminator

    Greetings Jon,
    Would you put this on the WIKI?
    Good info can be lost in the forum whereas in the WIKI it can be easily found. From memory there's a section on serial code.
    Cheers
    John
  174. Replies
    11
    Views
    1,395

    Re: Merry Christmas everyone

    Merry Christmas and a Happy New Year to all my forum friends and a special greeting to Les for his amazing compiler and Lester for his helpful forum.
    Have a good one everyone.
    PS Graham, no...
  175. Replies
    20
    Views
    6,307

    Re: PIC Basic to Proton Basic Convertion

    George, I should have used past tense "used". However there was a small advantage pre Proton Studio and Fineline in that when loading an INC file in the old IDE an Inc file had to be accessed by...
  176. Replies
    20
    Views
    6,307

    Re: PIC Basic to Proton Basic Convertion

    Include files with a .BAS extension work fine as long as it agrees with the file type of the actual file. I often use it.
    John
  177. Re: New Serial EERAM has nonvolatility at the Speed of SRAM

    Norm, your mailbox is full and it won't accept messages. This is the only way I can communicate.
    John
  178. Replies
    20
    Views
    6,307

    Re: PIC Basic to Proton Basic Convertion

    Would you please describe what the line does?
    Then we can be a little more helpful.
    John
  179. Re: Need more pins! Support update / alternative for 16F18455?

    Oh well, I was close!
    Get yourself a copy of the program called "Everything". Google will find it.
    It's a tiny EXE that doesn't need installing. It's free and is absolutely the fastest file finder...
  180. Re: Need more pins! Support update / alternative for 16F18455?

    Dave,
    The simplest way to check is to look in the list of .def files in sub folders of ProtonIde in Program files (x86).
    John
    John
  181. Replies
    142
    Views
    13,768

    Re: Les's ILI9325 Wiki code

    Greetings all,
    Well this touch stuff is proving hard.
    Two problems
    1) the code on the WIKI and Forum of Les's Touch control has the leading %0 problem. I reckon I can guess my way around that.
    2)...
  182. Replies
    19
    Views
    2,581

    Re: Microcap now free

    Good one Gamboa, time for breakfast and my morning vegemite :)
    @George: They screech and carry on, drop pine cones on cars and roofs and can be a bit of a pain (yours excepted of course Ken). So...
  183. Replies
    19
    Views
    2,581

    Re: Microcap now free

    At least the galah knows which is up Ken.
    Good links too.
    Sorry Fanie drop bears are native to Australia and cannot be found in South Africa.
  184. Replies
    19
    Views
    2,581

    Re: Microcap now free

    If only you blokes on top realised how tough it is gripping on with our toes. Only last week one of my mates got cramp and now he's gone, right through the hole in the ozone layer.
  185. Replies
    7
    Views
    1,568

    [SOLVED !] Re: Clean up old versions

    Oh!
    Now some extra words so the forum is happy.
    :)
    John
  186. Replies
    16
    Views
    2,819

    Re: It's Christmas, how about a bit of giving?

    G'day Bob,
    I find the safest way with PayPal is to transfer a small amount of money into my PayPal account from time to time ($200). Then that's the most I can lose. It would hurt if it was stolen...
  187. Replies
    7
    Views
    1,568

    [SOLVED !] Re: Clean up old versions

    G'day Rick,
    If you look at the properties of the shortcuts you'll find they point to the same file. So just delete the shortcut you don't want. Then I just uninstall the old registry entries using...
  188. Replies
    9
    Views
    1,369

    Re: file missing from Proton 3.7.3.3 update??

    Thanks Les.
    John
  189. Replies
    9
    Views
    1,369

    Re: file missing from Proton 3.7.3.3 update??

    Les, please re- consider using the Proton Files area if possible as we can go there anytime without having to remember an outside URL.
    Best wishes
    John
  190. Replies
    60
    Views
    8,920

    Re: Driver for ILI9341

    Thanks Flosi and Charlie, 3.3 it will be. I'll use the Amicus18 for experiments and make sure it's putting out 3.3.
    Cheers from Oz
    John
  191. Replies
    60
    Views
    8,920

    Re: Driver for ILI9341

    Hi Charlie,
    My graphic LCD have arrived. I think they are the same as yours although they have the touch chip.
    Before I blow them up, are they 3.3 or 5volt devices.
    All the best
    John
  192. Replies
    16
    Views
    2,819

    Re: It's Christmas, how about a bit of giving?

    Done, every bit helps.
    John
  193. Replies
    13
    Views
    1,973

    Re: Proton review

    Thanks for the info Lester, I'll make some changes tomorrow.
    John
  194. Replies
    13
    Views
    1,973

    Re: Proton review

    Lester/Stephen,
    Thought I'd better do it before the search engines found the page. It was easier than I thought, my web authoring program made it a piece of cake.
    Would you please check it I have...
  195. Replies
    13
    Views
    1,973

    Re: Proton review

    Stephen, I use WebPlusX7 a UK product but unfortunately no longer supported. They moved to another product. I know I can insert HTML but from memory I think the program has support for keywords. I...
  196. Replies
    13
    Views
    1,973

    Re: Proton review

    Thanks for the tips Lester and Stephen. As you can tell I'm no expert at these things. Personally I'm not interested in how many hits my site receives, however, I do want to do what I can to increase...
  197. Replies
    13
    Views
    1,973

    Proton review

    As promised I've written a brief review of PDS.
    I get a reasonable number of hits on my Amateur Radio Website so I've created a page about Proton.
    PDS deserves to be more widely used. If enough of...
  198. Replies
    49
    Views
    8,804

    Re: PIC 18F1330 HPWM problem

    G'day Archi,
    I can't help with your question but maybe help you with getting an answer.
    It's very hard to read your code when you post as you do.
    When you post code use the advanced tab. Then when...
  199. Replies
    8
    Views
    2,043

    Re: Christmas Lights

    I'm with you Bob, last year I had to clean up under the monitor each day. The bits were so small and sharp. I can feel a competition coming on. How about a timer Lester? Although I can see a problem...
  200. Replies
    15
    Views
    1,857

    Re: 3.7.3.1 download will not unzip

    Hi Bob,
    That's it, you've found the problem. I used Chrome and everything worked as it should.
    Firefox has of late developed some strange actions. I also use it to access a cloud based service of...
Results 1 to 200 of 1000
Page 1 of 5 1 2 3 4