News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

How to fix the slow scroll

Started by TimB, Aug 21, 2021, 07:18 PM

Previous topic - Next topic

TimB

Hi,

I have an issue where most of the code scrolls fine. Others visibly have a moving wave as it updates the page.

Scroll further down and its back to being ok

This is the code that is giving so much issue. My machine is a very new i7 so its not the PC's fault.

BTW you can insert this into any code and it will slow it down

;   fan Control vars etc

    Dim pFANPWM_Pin As PORTC.2
    Dim wRequiredPWM As Word
    Dim wCurrentPWM As Word



; PWM calcs

    Dim cTempMin As 27
    Dim cTempMax As 42
    Dim cTempMaxFault As 68
    Dim cTempDiff As cTempMax - cTempMin

    Dim fDoPWMCalc As Bit

    Dim cFanPWMMin As 650
    Dim cFanPWMMax As 50
    Dim cFanPWMDiff As (cFanPWMMin - cFanPWMMax) * 10                           ' Calculate the difference between the 2 values
    Dim cFanPWMStepScaled As cFanPWMDiff / cTempDiff                            ' Now calculate the value of pwm steps for every 0c between

; Fan rotation check vars

    Dim cNoFans As 6
    DIm cFanFailVal as 10
    DIm aFanfailCounter[cNoFans] as byte
    Dim bFanFailCounter1 As aFanfailCounter#0
    Dim bFanFailCounter2 As aFanfailCounter#1
    Dim bFanFailCounter3 As aFanfailCounter#2
    Dim bFanFailCounter4 As aFanfailCounter#3
    Dim bFanFailCounter5 As aFanfailCounter#4
    Dim bFanFailCounter6 As aFanfailCounter#5

    Dim bFansNotRunning As Byte

    dim bFanflags as byte
    Dim bLastFanFlags as Byte
    DIm wFanFaultResetTimer as word

CPR

Works absolutely fine here. What graphics card do you have?

TimB


After a reboot its working again. No ripple

Tim

CPR

A very new i7 "run in" procedure. Switch it off and on again does help "bed" everything in. (But be careful over running the same programs over & over - that can wear grooves in the memory)  ;)

caseeaks

Can a small problem harm the whole code?

JArnett

#5
Computer networks continue to grow continuously; of course, a small error can crash the whole system, but people are constantly working on bugs to avoid this. Moreover, certain companies help find errors for ordinary users and organizations. A few months ago, my raid system started to crash heavily; this had never happened before. On the advice of a friend, I contacted salvagedata.com for help. These guys optimized the raid for me; now, it works even better than before.

joesaliba