News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

measure High pulse width

Started by hitronics, Dec 28, 2023, 09:37 PM

Previous topic - Next topic

hitronics

because of first time that use timer so things getting now cleared.
Dim TIMER1 As TMR1L.Word what is the meaning?

JonW

Instead of needing to transfer both upper and lower byte of 16 bit timer, the compiler allows you to link them with a single word.

So TMR1.H and TMR1.L can be accessed via a single identifier


Dompie

Your Word variable (=2 bytes) TIMER1 now receives the same address as TMR1(Lowbyte+Highbyte) with this statement. So wherever you use Timer1 in your program, you get the current value of TMR1. Of course you can also give Timer1 (=TMR1) a value.

Johan

Oeps, Jon was faster

hitronics

#23
ok, another point how to know hex format of configuration bits of 12F675 to put inside proteus?
now it is working, thanks

trastikata

Quote from: hitronics on Dec 30, 2023, 05:27 PMok, another point how to know hex format of configuration bits of 12F675 to put inside proteus?
now it is working, thanks

Hello hitronics,

I have the feeling you lack some very basic knowledge about this compiler and PICs in general.

It would be much easier for us and beneficial for you if you first take the time, as @JonW already mentioned, to read the manual, try to understand it and then ask if you have questions.

It seems you don't know how the hardware works and we are trying to explain the software to set it up and run it.

Regards

P.s. What are you trying to achieve with your project, why is purely software solution not sufficient?

hitronics

Quote from: trastikata on Dec 30, 2023, 06:43 PM
Quote from: hitronics on Dec 30, 2023, 05:27 PMok, another point how to know hex format of configuration bits of 12F675 to put inside proteus?
now it is working, thanks

Hello hitronics,

I have the feeling you lack some very basic knowledge about this compiler and PICs in general.

It would be much easier for us and beneficial for you if you first take the time, as @JonW already mentioned, to read the manual, try to understand it and then ask if you have questions.

It seems you don't know how the hardware works and we are trying to explain the software to set it up and run it.

Regards

P.s. What are you trying to achieve with your project, why is purely software solution not sufficient?

I will try to do my best, thanks

JonW

#26
Study page 52 on the datasheet. Please select what you need and convert.  I doubt Proteus models CFG correctly., it has many issues.   I already simulated the code for you???   If this is for School, then make sure our forum gets credit for the work we did. If it is paid work, you can contribute financially by buying another compiler or donating.



Pepe

demo with interrup and display show de time of pulse

Pic-ignorant

Quote from: trastikata on Dec 30, 2023, 06:43 PM
Quote from: hitronics on Dec 30, 2023, 05:27 PMok, another point how to know hex format of configuration bits of 12F675 to put inside proteus?
now it is working, thanks

Hello hitronics,

I have the feeling you lack some very basic knowledge about this compiler and PICs in general.

It would be much easier for us and beneficial for you if you first take the time, as @JonW already mentioned, to read the manual, try to understand it and then ask if you have questions.


It seems you don't know how the hardware works and we are trying to explain the software to set it up and run it.

Regards

P.s. What are you trying to achieve with your project, why is purely software solution not sufficient?

Is it necessary to question his coding ability & understanding of the hardware? That comes across as quite patronising imho

BR
John

trastikata

Quote from: Pic-ignorant on Jan 01, 2024, 10:44 PMIs it necessary to question his coding ability & understanding of the hardware? That comes across as quite patronising imho

Did you read the entire discussion? At some point it became apparent that this topic is behind the current knowledge of the OP.

My words might sound harsh but there was no offense meant here, nor an attempt to patronize anybody, but the facts only - help means tips and advises and if more than that is expected, then this should be made clear.

SeanG_65

I would set a 16 bit timer to give an interrupt on rollover. Set to auto reload.

Use a second counter to count the number of "roll overs". The final count will be (rollovers * 2^15) + current counter value

Pic-ignorant

Quote from: trastikata on Jan 02, 2024, 12:13 AM
Quote from: Pic-ignorant on Jan 01, 2024, 10:44 PMIs it necessary to question his coding ability & understanding of the hardware? That comes across as quite patronising imho

Did you read the entire discussion? At some point it became apparent that this topic is behind the current knowledge of the OP.


My words might sound harsh but there was no offense meant here, nor an attempt to patronize anybody, but the facts only - help means tips and advises and if more than that is expected, then this should be made clear.

Hi Trastikata,
My apologies for misreading the situation. Looking through the posts, I can see you are a major contributor and an asset to the forum.

Best Regards
John