Recent content by Maniac_XOX

  1. M

    How to program a buzzer to a PIC18F452 with PROTEUS and MPLAB IDE?

    Nevermind haha I have managed to make it through with some work, i had to also switch to a DC operated buzzer Here is the code I have used: #define _XTAL_FREQ 4000000 #define switch3 PORTBbits.RB4 // SWITCH INTERFACED #define buzzer PORTCbits.RC0 // BUZZER INTERFACED void BuzzerFunc(void)...
  2. M

    How to program a buzzer to a PIC18F452 with PROTEUS and MPLAB IDE?

    crystal frequency is 4MHz The code i have tried is: #include <p18cxxx.h> #include <xc.h> void main(void) { TRISC = 0; // making TRISC pins output ADCON1 = 0x07; // making them digital pins while(1) { RC0 = 1; __delay_ms(5000); RC0 = 0...
  3. M

    Comp Sci Interrupts on pic18f452 not shooting in mplab X, help? C language

    I have actually managed to get the seconds right with the right calculations and settings finally! Would you mind taking a look at the merged thread that is on reply #4? I have a couple questions on there regarding my proteus design and things i need to change in it, here it is below: #define...
  4. M

    Comp Sci Interrupts on pic18f452 not shooting in mplab X, help? C language

    4MHz is the the frequency of the oscillator (Fosc), to find the the frequency of the internal instructions (set in the timer0 control register, TMR0CON) you divide Fosc by 4. So the time for one instuction takes 1/frequency = 1/(4/4) So far i have used TMR0L = any integer to preload the timer...
  5. M

    Comp Sci Interrupts on pic18f452 not shooting in mplab X, help? C language

    PLease help, I am fairly new to proteus and mplabx so I am trying to udnerstand how it all works. I am using PIC18F452 microcontroller. I have this circuit in proteus shown at the bottom of the text. The code: #define _XTAL_FREQ 4000000 //Set the config bits #pragma config WDT = OFF, BOR =...
  6. M

    Comp Sci Interrupts on pic18f452 not shooting in mplab X, help? C language

    lol sorry that was a typo in the code i actually write it as 4000000 so it would be 4MHz, but the problem persists
  7. M

    Comp Sci Interrupts on pic18f452 not shooting in mplab X, help? C language

    I am using MPLAB X, everything is working great when I work on examples that require smaller or no preload at all, I do not understand why that is the case, is there a limit to the TMR0L? Hello please help asap, my specific case I have: 4MHz crystal -----> 1 / (4MHz / 4) = 1MHz timer I...
  8. M

    State space controllers - find equations from differentials

    I never asked to solve problems for me in fact i have been happy to do all the tedious mathematical work, even with the 'general' information you give me, which I still appreciate. I have viewed the pdf multiple times and have even gone through the example on there before attempting it on my...
  9. M

    State space controllers - find equations from differentials

    I believe my state variables to be H and T? I have also read this so does that mean i could make a pair of output equations and state vectors for each differential individually and model it in parallel on simulink?
  10. M

    State space controllers - find equations from differentials

    Yes i am trying to find the state vector equation. How do I get the A and B matrices? does the output vector look okay?
  11. M

    State space controllers - find equations from differentials

    sorry Lol everytime i work on the notebook i keep converting them to the variables in my problem, I'll change them now, problem is i have set T as y so there can be confusion. I will set y in SS equation as output from now
  12. M

    State space controllers - find equations from differentials

    So i am aware that the outputs must be H' and T' therefore I believe the output equation in SS form to be $$ output, y = \begin{bmatrix} Z' \\Y' \end{bmatrix} = \begin{bmatrix} -0.061 & 0\\ 0.10874 & -\frac{80}{11} \end{bmatrix}\begin{bmatrix} Z \\ Y\end{bmatrix} + \begin{bmatrix} 0.3636\\ 0...
  13. M

    State space controllers - find equations from differentials

    Summary:: This is similar to the examples of electrical circuit state space analysis, I have been trying to find the state space equations from the following non linear first order differentials but I keep getting stuck. Any help? A) Started off from non linear equations: $$y' =...
  14. M

    Engineering First order non linear to state space equations

    I have taken a look at example 2 of what you sent as it most relates, and I have tried working that example myself which i did successfully without much effort. but when I do it on my case, it becomes a much complex task.. In the example for first-order differentials, i had to reverse the...
  15. M

    Engineering First order non linear to state space equations

    How to represent this system in state space form? where: $$ x' = Ax + Bu \text{ and }y = Cx + Du$$ I am trying to create a state space model based on these equations on simulink, need to find A, B, C and D but like I mentioned, i cannot find the solution when the differentials are not of...
Back
Top