Search found 115 matches

by arvinfx
23 Jul 2023 13:52
Forum: mikroBasic PRO for PIC General
Topic: Code size make me problem!
Replies: 1
Views: 374

Re: Code size make me problem!

I have found the problem, This is Paging issue. GOTO and CALL can not jump more than 11 bits that is 2kword long.So in PIC16Fxxx we have PCLATH register to switch into 4 PAGEs of 8kword memory. It has to generate and apply by compiler before any GOTO AND CALL and it will ( I checked ASM code ) BUT i...
by arvinfx
22 Jul 2023 21:22
Forum: mikroPascal PRO for PIC General
Topic: 16F689 problem when prog. exceeds Page 0
Replies: 6
Views: 2926

Re: 16F689 problem when prog. exceeds Page 0

I have same issue with pic16f877a .
How to solve it?
Sould i seperate my code to small sub procedures and call them one by one insted of a big code or what we can do?
by arvinfx
22 Jul 2023 20:48
Forum: mikroBasic PRO for PIC General
Topic: ROM memory full?
Replies: 2
Views: 1251

Re: ROM memory full?

Hello, The problem here is that the size one of your functions is too big that it cannot be successfully fitted into a single page of PIC16F877A. The page limit is 2K and your function alone was 1859 addresses long. Because it calls other procedures on other pages, PCLATH has to be set in order for...
by arvinfx
22 Jul 2023 15:52
Forum: mikroBasic PRO for PIC General
Topic: Code size make me problem!
Replies: 1
Views: 374

Code size make me problem!

Hi, I am trying to write a code on PIC16F877A . My code works if size of code is less than 1924 bytes which is 23% of total ROM, but if i add a small code like i=1 compiler makes my code 1986 bytes (24%) and my code works wrongly randomly reset or variable changes randomly !!!!!! Also I realized tha...
by arvinfx
19 Jul 2023 21:26
Forum: mikroBasic PRO for PIC General
Topic: How to send TEXT to a sub procedure ?
Replies: 1
Views: 452

How to send TEXT to a sub procedure ?

I need to have code to send a text to sub procedure like this:

Send_out("Hello World")

How to do it in correct way?
by arvinfx
13 Jul 2023 08:08
Forum: mikroBasic PRO for PIC General
Topic: PIC16F877A Reset due to UART functions
Replies: 2
Views: 428

Re: PIC16F877A Reset due to UART functions

If the controller does a reset then something is wrong with the circuit. Try a baud rate of 9600. As written it must not make a reset because then something is wrong with the circuit. Thanks for participation. 9600 BUAD rate make it worse! Even I can remember that on 1st project I ran simulator on ...
by arvinfx
12 Jul 2023 14:29
Forum: mikroBasic PRO for PIC General
Topic: PIC16F877A Reset due to UART functions
Replies: 2
Views: 428

PIC16F877A Reset due to UART functions

Hi, I have this problem in two projects both codes are so similar. I have TMR1 interrupt each 100ms and also UART1_Write_Text in some place of code. Problem is Random reset occur in both project or some time my program halt or do wrong code. At first I wonder that my Micro has some damage or Flash r...
by arvinfx
11 Jul 2023 14:53
Forum: mikroBasic PRO for PIC General
Topic: Wrong read EEPROM address! (Solved)
Replies: 2
Views: 500

Re: Wrong read EEPROM address!

Firewire wrote:
05 Jul 2023 13:59
Hello
Take a break of 30ms between the write commands.
It works . Thanks. :P
by arvinfx
03 Jul 2023 20:56
Forum: mikroBasic PRO for PIC General
Topic: Wrong read EEPROM address! (Solved)
Replies: 2
Views: 500

Wrong read EEPROM address! (Solved)

Hi, i am trying to read and write on EEPROM with EEPROM_Read command on PIC16F877A. But it reads wrong address or something is wrong code is this: Sub procedure Update_Events() Dim read_buf as word HI(read_buf) = EEPROM_Read(0x0) LO(read_buf) = EEPROM_Read(0x1) EEPROM_Write(0x0,hi(read_buf)) EEPROM_...
by arvinfx
10 May 2023 21:21
Forum: mikroBasic PRO for PIC General
Topic: Pull-up resistor problem on PIC18F45K80
Replies: 1
Views: 431

Pull-up resistor problem on PIC18F45K80

Hi I am trying to set all PORTB Pull-up resistors on in a PIC18F45K80 but RB0 , RB1 and RB4 denied to active pull-up resistor. My register settings is: PMD2=%00001111 TRISA=0 TRISB=255 '%00000000 TRISC=0 TRISD=0 TRISE=%00000000 INTCON=%11010000 INTCON2=%00000000 RCON.IPEN=0 ANCON1= 0 WPUB=255
by arvinfx
09 May 2023 09:56
Forum: mikroProg™ programmer and debugger
Topic: -Device detected: PIC12F508 !!!
Replies: 5
Views: 1750

Re: -Device detected: PIC12F508 !!!

same problem here! what is the problem!?
by arvinfx
11 Mar 2022 07:48
Forum: mikroProg™ programmer and debugger
Topic: How to NOT write in EEPROM ?? (Solved)
Replies: 3
Views: 1473

Re: How to NOT write in EEPROM ??

Thomas.Pahl@t-online.de wrote:
10 Mar 2022 15:52
read mikroprog manual page 20: advanced option.
Thanks! It works :wink:
by arvinfx
08 Mar 2022 16:25
Forum: mikroProg™ programmer and debugger
Topic: How to NOT write in EEPROM ?? (Solved)
Replies: 3
Views: 1473

How to NOT write in EEPROM ?? (Solved)

Hi,

I wonder how to not write in EEPROM while I am writing new version of "code" into chip!? everytime I try to update my code EEPROM has erased by "mikroBasic PRO for PIC" program.

Any advice?
by arvinfx
25 Feb 2022 07:52
Forum: mikroBasic PRO for PIC General
Topic: Bug in big codes ! "Solved"
Replies: 9
Views: 1830

Re: Bug in big codes !

Amazing replies and trick I have learnt from this topic . :wink: I have found the problem, It was in a do ... loop see: try=0 m=0 again: do data = Soft_UART_Read(m) inc(try) loop until (m = 0) or (try>10) IF try = 10 then delay_ms(10) goto again end if My crystal speed is 35mhz and UART baud rate is...

Go to advanced search