It is a 10bit PWM system but the resolution of the PWM signal depends on the PWM period or frequency. Higher the frequency, the lower the resolution.
So, at 20MHz and a frequency signal of 125KHz,...
Type: Posts; User: Ioannis; Keyword(s):
It is a 10bit PWM system but the resolution of the PWM signal depends on the PWM period or frequency. Higher the frequency, the lower the resolution.
So, at 20MHz and a frequency signal of 125KHz,...
Hi Jerson.
Thanks for the good points. Yes I will change the ISR to what you suggested. But in any case as it is now, it works very good. With your suggestion will be more efficient and fast in...
Anyone managed to control an 3 1/2 arithmetic LCD display?
The 16F1939 chip has internal LCD driver to create the proper voltages for backplane and each LCD segment.
A PicBasic example would...
Mismatch is taken care in the ISR (5th command in the IOC2 routine) and the then interrupt flag bit is reset.
My problem is that it does interrupt continuously as the user keeps pressing the...
Any idea how can the keyboard matrix scan routine check for key release, before jumps to the keycheck subroutine please?
keyscan:
while 1
for ix=0 to 2 'scan columns
...
The interrupt on change is created by a matrix keyboard connected on portB (0-6).
I noticed that a short keypress allows PIC go to sleep, while a longer press keeps it semi awake.
Then I added...
Additional info:
The ADC uses internal Vref of 0.6 volts to check the battery power supply. Before sleep the ADC is switched off.
Also UART is switched off, along with Tmr1 and some ports...
On a 16F886 the following code initially is in sleep mode having almost 0 current through PIC.
But after first interrupt-on-change (port B), the sleep does not zero current. It stays rather high...
SKIP 4 as a modifier maybe?
Ioannis
In the past was not in the annoying side of spams. Checked the previous posts and cannot decide to kick him/her out... We'll keep our eye on..
Ioannis
Use #config and #endconfig like this for example:
#CONFIG
__CONFIG _CP_OFF & _DEBUG_OFF & _CP_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _PWRTE_ON & _WDT_OFF & _XT_OSC
#ENDCONFIG
Ioannis
Sure I will,
Ioannis
Thank you tumbleweed.
Will give it a try,
Ioannis
Are there any updates regarding the K42 devices and DT-INTS ?
Ioannis
Agree.
Though I have checked various implementations of RF remote controls and many have wide tolerances from the specified timings.
I am very much sure that those chips are bad copies of the...
In general the data stream on a good signal level is very clean. But when there is no RF signal, the radio module will produce a lot of noise that is converted to random pulses through the data...
My simple thinking lead me to this version ditching the big array:
index=0
pulsetrain: 'now collect 66 pulses ~800/400 ìsec
pulsin portb.0,1,temp1
if temp1<55...
if langvar[x]=0 then
Y=(topline[x])*8+OFS
else
Y=(topline[x])*8-OFS
endif
Ioannis
The more I observe your code and way of thinking, the more I see its briliance.
Thank you again Richard,
Ioannis
Sure I agree but could not find a fast way to encode directly the PWM bit stream into bits. The bits are coming from an RF radio receiver and have the typical 66-bit format of a keeloq transmission:...
Thanks Richard.
Makes sense though kinda heavy in respect of calculations.
Ioannis
There is an array of n elements. Each element stored the pulse width from a PulsIn. Then according to pulse width, the bit_array bit will be 0 or 1. But if it is out of range then a new data set will...
I guess cost is a prime factor for this.
Ioannis
Thank you Jerson.
I had this error in the above routine that collects the pulse train from the receiver module.
Now works remarkably ok. No problem with the decoding. Also works fine.
...
False alarm... Sorry.
code[index] should be code1[index] in the for-next loops.
Ioannis