Search found 20 matches
- 17 Apr 2009 16:13
- Forum: mikroBasic General
- Topic: LCD440 LIBRARY- 40x4 LCD & DUAL-LCD DRIVERS/SOURCE CODE
- Replies: 4
- Views: 6040
Sorry to drag up a very old thread - but I'm having a strange issue with my 40x4 display. Everything seems to work fine with xor's code, except when I try and 'overwrite' on the 3rd and 4th row. It shifts the 3rd and 4th row left, the number of characters I'm writing! I'm trying to set up a display ...
- 09 Apr 2009 14:41
- Forum: mikroBasic General
- Topic: the impossible? DS1820 and USART interrupt?
- Replies: 2
- Views: 1633
- 08 Apr 2009 22:17
- Forum: mikroBasic General
- Topic: the impossible? DS1820 and USART interrupt?
- Replies: 2
- Views: 1633
the impossible? DS1820 and USART interrupt?
Hi guys, I have put several posts up asking specific questions for some of my projects. Thanks to all those that have helped me out! This question is fairly straightforward: I have a PIC that is reading temperatures with a DS1820 sensor. I want the same PIC to receive data from a second PIC via an i...
- 03 Apr 2009 14:22
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
xor, Thanks! I had to change INTCON.TMR0IF = 0 to INTCON.T0IF = 0 and remove CMCON = 7. I have a plain old 877, not an 877A, I think this is why. Other than that it is working perfectly. I don't really see how this helps me though, other than giving me less interrupts... I am trying to interface to ...
- 02 Apr 2009 23:20
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
:oops: That is exactly what I needed to know... I hadn't seen that column of the data sheet and (stupidly) assumed that the registers would be set to 0 on startup/reset. I really appreciate you taking the time to answer these questions xor. Thank you!! Andrew p.s. I have got round the interrupt prob...
- 02 Apr 2009 18:15
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
If HEX is confusing convert it to a binary value and you will see the bit values more easily. :) You miss my point. I can easily convert Hex to binary (MikroBasic even has the handy tool on the 'converter' tab). My point is when people use hex they are setting the full byte to a set of '1's and '0'...
- 02 Apr 2009 13:36
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
xor, Thanks for the reply. I will try and get the timer1 TCKI working as it would save an interrupt. To be honest, this is for a kind of wind turbine so frequency is very low indeed, but it's always good to see how the technology reacts in extremes. For those that are interested, I have found tweaki...
- 01 Apr 2009 22:17
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
Apologies, that should be
I've tested it up to 30khz, i get 30800 Hertz on the display. Maybe with a bit of tweaking I could get this a little more accurate. Above that and the interrupts get too much for the PIC...
Andrew
Code: Select all
if tally = 400 then
Andrew
- 01 Apr 2009 22:07
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
It's working! sort of... I found that I needed to add the line CCP1CON = %00000101 to enable capture mode on every rising edge. My code is now: '============================================================== '| frequency counter that measures pulses input on C2 and | '| displays number of HERTZ on g...
- 01 Apr 2009 16:13
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
OK, so I'm confused... I have taken the example from the Mikro CD that uses TMR0 to flash the PORTB LED's once a second. It works fine on my PIC16F877. Since I want to develop this code and mess around with other interrupts, I wanted to understand exactly what was going on. I have changed the one li...
- 01 Apr 2009 14:35
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
Hi nots, Thanks for the reply - I haven't got any further with this. I can get the flashing LED program to work from the Mikro CD (it uses TMR0 and interrupts) but still haven't been able to adapt it for my project. I'm going to be working on this over the next couple of days, hopefully I will figur...
- 27 Mar 2009 19:07
- Forum: mikroBasic General
- Topic: frequency counter (using timer and CCP)
- Replies: 14
- Views: 8209
frequency counter (using timer and CCP)
Hi everybody, I have some code that I am trying to get working and would like some help... It's basically a frequency counter. I want to be able to read low frequencies (0 - ~50Hz) input on CCP1 pin, <C.2>. I have a CCP interrupt counting pulses on C.2 and I am using timer 0 (8 bit) counting up and ...
- 27 Mar 2009 13:53
- Forum: mikroBasic General
- Topic: remote sensor sending data over RF
- Replies: 14
- Views: 6740
- 25 Mar 2009 00:52
- Forum: mikroBasic General
- Topic: remote sensor sending data over RF
- Replies: 14
- Views: 6740
Hi zan, I have just fired up the two pics and the code is working, well, most of the time... It seems that when I hit reset, sometimes it works and sometimes it displays nothing and sometimes it displays random characters. It is the first time I have had PIC to PIC communications so I thank you for ...
- 24 Mar 2009 14:00
- Forum: mikroBasic General
- Topic: remote sensor sending data over RF
- Replies: 14
- Views: 6740
hi zan, I appreciate you taking the time to look through (and correct!) my code. Thank you! Apologies if I spoke out of turn, I am relatively new to PICs and thought I had gained enough basic knowledge over the past couple of weeks to ask sensible questions on the forum. I have battled through the o...