oooppsss !
Yes, you're right, thanks.
The 16F877 doesnt have the CMCON register,
only the 16F877A has the CMCON.
Many thanks !
Search found 69 matches
- 09 Jul 2022 00:17
- Forum: mikroBasic PRO for PIC General
- Topic: CMCON = 0 compiling ERROR !!!
- Replies: 2
- Views: 964
- 08 Jul 2022 22:12
- Forum: mikroBasic PRO for PIC General
- Topic: CMCON = 0 compiling ERROR !!!
- Replies: 2
- Views: 964
CMCON = 0 compiling ERROR !!!
Hi all,
I'm programming the PIC16F877.
When compiling, I have the error "Identifier 'CMCON' was not declared" at the following line:
Why ???
Any idea ?
I don't know. I'm using Mikrobasic PRO for PIC, versione 7.6.0
Thanks
I'm programming the PIC16F877.
When compiling, I have the error "Identifier 'CMCON' was not declared" at the following line:
Code: Select all
CMCON = 0
Any idea ?
I don't know. I'm using Mikrobasic PRO for PIC, versione 7.6.0
Thanks
- 22 Mar 2022 18:46
- Forum: mikroBasic PRO for PIC General
- Topic: How to set the Registers with I2C ?
- Replies: 2
- Views: 1100
Re: How to set the Registers with I2C ?
Ah, ok, thanks! Then it would be nice to know what values Mikrobasic sets for these registers. For example: SSPCON.SSPEN = 0 ' defult = 0 - Synchronus Serial Port Enable bit SSPCON.CKP = 0 ' defult = 0 - Click Polarity Select bit SSPCON.SSPM3 = 0 ' defult = 0 - Synchronous Serial Port Mode Select bi...
- 22 Mar 2022 17:32
- Forum: mikroBasic PRO for PIC General
- Topic: How to set the Registers with I2C ?
- Replies: 2
- Views: 1100
How to set the Registers with I2C ?
Hi all, I have a little doubt about I2C module initialization on Mikrobasic PRO for PIC (PIC16F887 and RTC DS1307) I know that using the I2C_init (100000) command, I can set the I2C module with 100kHz velocity: but the Registers of I2C ? In other words, the SSPCON, the SSPSTAT and SSPADD registers m...
- 20 Mar 2022 22:21
- Forum: mikroBasic PRO for PIC General
- Topic: RTC, I2C and example mikroE
- Replies: 6
- Views: 1556
Re: RTC, I2C and example mikroE
Sorry I was wrong. The example I took from this mikroe page (not from folder): https://www.mikroe.com/rtc2-proto-board Please, let me know if you think that there are errors so I will update my code. However, I don't undestand the following lines: could you explain me ? I2C1_Wr(0xD0) ' address DS130...
- 20 Mar 2022 02:00
- Forum: mikroBasic PRO for PIC General
- Topic: Read and Send values to RTC - Differences of code
- Replies: 0
- Views: 793
Read and Send values to RTC - Differences of code
Hi all. my ultimate rutines for Read and Write values to 1307. Could be better ? Please, your comment or your evaluation, thanks. ' Write to RTC I2C1_Start() ' issue start signal I2C1_Wr(0xD0) ' address DS1307 I2C1_Wr(0) ' start from word at address 0 I2C1_Wr(0x10) ' write SECONDS to REGISTER 0 I2C1...
- 20 Mar 2022 00:38
- Forum: mikroBasic PRO for PIC General
- Topic: RTC, I2C and example mikroE
- Replies: 6
- Views: 1556
Re: RTC, I2C and example mikroE
Hi Firewire, many thanks. I removed I2C1_Wr(0x80) ' write $80 to REG0 (pause counter + 0 sec) and also I2C1_Start() ' issue start signal I2C1_Wr(0xD0) ' address DS1307 I2C1_Wr(0) ' start from word at address 0 I2C1_Wr(0) ' write 0 to REG0 (enable counting + 0 sec) I2C1_Stop() ' issue stop signal Now...
- 16 Mar 2022 15:57
- Forum: mikroBasic PRO for PIC General
- Topic: Source size does not match destination size
- Replies: 4
- Views: 1544
- 16 Mar 2022 11:19
- Forum: mikroBasic PRO for PIC General
- Topic: RTC, I2C and example mikroE
- Replies: 6
- Views: 1556
Re: RTC 1307 and sample mikroe
Yes, 10k pull-up.
Maybe in the code that I have used there are an error ?
How to send the data to the DS1307: in decimal value or hex value ?
If you see the code, seems that some in hex and some in decimal.
Maybe I'm a bit confused...
Thanks
Maybe in the code that I have used there are an error ?
How to send the data to the DS1307: in decimal value or hex value ?
If you see the code, seems that some in hex and some in decimal.
Maybe I'm a bit confused...
Thanks
- 15 Mar 2022 19:00
- Forum: mikroBasic PRO for PIC General
- Topic: RTC, I2C and example mikroE
- Replies: 6
- Views: 1556
RTC, I2C and example mikroE
Hi all. I found a sample code on the mikroe pages website. I am building a small calendar clock with LCD module and DS1307 chip (with micro 16F887). I made some small changes to the original code because I need the 1 Hz on the Output pin of DS1307. But it doesn't seem to work. I don't understand whe...
- 15 Mar 2022 11:49
- Forum: mikroBasic PRO for PIC General
- Topic: Source size does not match destination size
- Replies: 4
- Views: 1544
Re: Source size does not match destination size
Solved,
thank you very much.
thank you very much.
- 15 Sep 2020 00:51
- Forum: mikroBasic PRO for PIC General
- Topic: SetBit, ClearBit and TestBit
- Replies: 3
- Views: 1330
Re: SetBit, ClearBit and TestBit
So, in a conditional statement is better NOT used the pseudo-routines meneawhile for assignment is indifferent, is right ?
- 14 Sep 2020 21:55
- Forum: mikroBasic PRO for PIC General
- Topic: SetBit, ClearBit and TestBit
- Replies: 3
- Views: 1330
SetBit, ClearBit and TestBit
Hi all.
Just a simply question, please.
In your opinion is better to use
or simply statement
?
Thanks
Just a simply question, please.
In your opinion is better to use
Code: Select all
SetBit(PORTB, 2)
ClearBit(INTCON, RBIF)
if TestBit(INTCON, INTE)...
Code: Select all
PORTB.2 = 1
INTCON.RBIF = 0
if INTCON.INTE = ...
Thanks
- 14 Sep 2020 21:41
- Forum: mikroC PRO for PIC General
- Topic: Command number about LCD Custom Char Generator
- Replies: 2
- Views: 951
Re: Command number about LCD Custom Char Generator
Thanks paulfjujo.
The refecence LCD is for 1602 (16 char and 2 lines)
Regards
The refecence LCD is for 1602 (16 char and 2 lines)
Regards
- 26 Aug 2020 13:11
- Forum: mikroC PRO for PIC General
- Topic: Command number about LCD Custom Char Generator
- Replies: 2
- Views: 951
Command number about LCD Custom Char Generator
Hi all.
I am creating some custom characters with the "Custom Char Generator" tool.
I didn't understand what the line is for:
For each new character there is a different number.
What does it mean?
Thank you
I am creating some custom characters with the "Custom Char Generator" tool.
I didn't understand what the line is for:
What does the "80" command correspond to?Lcd_Cmd(80);
For each new character there is a different number.
What does it mean?
Thank you