Search found 13 matches

by salvatore
04 Aug 2016 23:19
Forum: mikroBasic PRO for PIC General
Topic: IRP bit must be set manually for indirect access to '?Loca
Replies: 27
Views: 31045

Re: IRP bit must be set manually for indirect access to '?Lo

if (UART1_Data_Ready() = 1) then UART1_Read_Text(dato_letto, "OK", 23) UART1_Write_Text(dato_letto) 'ECO to sender end if Thanks for the reply, I understand how to operate, even if the method is more suitable for the assembler that not for a high-level language (I am surprised that it has never bee...
by salvatore
01 Aug 2016 22:10
Forum: mikroBasic PRO for PIC General
Topic: IRP bit must be set manually for indirect access to '?Loca
Replies: 27
Views: 31045

Re: IRP bit must be set manually for indirect access to '?Lo

Hi! This is an extract of the program that doesn't work: program bank0123 'PIC 16F886 8MHz 'Interrupt: 1ms, LED display handling 'UART: BT module Symbol display = PortB Symbol colonna_display = PortA Symbol tic = flag.0 dim dato_letto as string[23] absolute 0x130 '<------------------ dim shifter, po...
by salvatore
18 Jul 2016 22:25
Forum: mikroBasic PRO for PIC General
Topic: IRP bit must be set manually for indirect access to '?Loca
Replies: 27
Views: 31045

Re: Re:

I do not know how I can set the flag if I want, for example, to sum two variables that are stored in two different banks, for example bank0 and bank3. example: dim T_read as integer[10] ' bank 3 dim t_middle as integer 'default, bank 0/1 ... t_middle = t_middle + T_read Thanks for your answer, but ...
by salvatore
17 Jul 2016 23:42
Forum: mikroBasic PRO for PIC General
Topic: IRP bit must be set manually for indirect access to '?Loca
Replies: 27
Views: 31045

Re:

Hi, You have a memory bank problem.IRP is bank select bit used for indirect addressing.Our compiler is not capable to set IRP bit. IRP=0 -> Bank 0,1 IRP=1 -> Bank 2,3 So you must do that manually. Also you can use 'absolute' directive and move variable at memory banks 0 and 1(directive absolute spe...
by salvatore
01 Jun 2016 23:09
Forum: mikroBasic PRO for PIC General
Topic: Uart baud rate error
Replies: 3
Views: 2580

Re: Uart baud rate error

Hi! I've solved adding OSCTUNE istruction (calibrate it's necessary?): it work fine in a range from 1 to 14... now is setted to 7. I don't know if is it a chip problem, could be it but I haven't another one to try... One question: I use a 24 us code every 1 ms interrupt routine: could give this prob...
by salvatore
28 May 2016 23:54
Forum: mikroBasic PRO for PIC General
Topic: Uart baud rate error
Replies: 3
Views: 2580

Uart baud rate error

Hi, I've a problem on Pic 16F883 using UART :evil: on EasyPIC5 and MikroBasic PRO... The Uart is initialized at 9600, terminal is set at 9600, but the received characters are wrong. I send "Start!" one time and then "Waiting..." every one second and on terminal will display: Staòt! ×aiténg... Waitin...
by salvatore
29 Apr 2016 22:07
Forum: Development Boards
Topic: Timing RS232
Replies: 10
Views: 6567

Re: Timing RS232

Hi, In our project settings you can set the source for the MCUs clock, but not the frequency for internal oscillator. I will pass this to our developers, so they can try to implement it. Yes, you would have to use external oscillator for 10MHz frequency. Best regards, Uros OK, thanks! Salvatore PS:...
by salvatore
27 Apr 2016 22:48
Forum: Development Boards
Topic: Timing RS232
Replies: 10
Views: 6567

Re: Timing RS232

Hi, Internal oscillator for this MCU works up to 8MHz frequency. When you change frequency, you need to set specified IRCF bits in OSCON register. For example, if you want to set 8MHz frequency, you should set these bits like this: OSCCON.b6 = 1 OSCCON.b5 = 1 OSCCON.b4 = 1 UART will work fine for a...
by salvatore
27 Apr 2016 21:19
Forum: Development Boards
Topic: Timing RS232
Replies: 10
Views: 6567

Re: Timing RS232

Hi, Internal oscillator for this MCU works up to 8MHz frequency. When you change frequency, you need to set specified IRCF bits in OSCON register. For example, if you want to set 8MHz frequency, you should set these bits like this: OSCCON.b6 = 1 OSCCON.b5 = 1 OSCCON.b4 = 1 UART will work fine for a...
by salvatore
21 Apr 2016 00:00
Forum: Development Boards
Topic: Timing RS232
Replies: 10
Views: 6567

Re: Timing RS232

Hi, I believe you should also configure specified pins, disable comparators, etc. Can you please zip and send your whole project so I can test it? Best regards, Uros See attached. With 4MHz clock work perfectly from 1200 to 14400 baud, but if I change the clock the problems beginning... (I need to ...
by salvatore
18 Apr 2016 10:40
Forum: Development Boards
Topic: Timing RS232
Replies: 10
Views: 6567

Re: Timing RS232

uros.cvetinovic wrote:Hi,

Everything that you said suggest that you didn't set right config bits for oscillator and frequencies.

Can you zip and attach your project, so I can check?

Best regards,

Uros
I've attached the setting window project, inside the mikrobasic code only uart setting...[UART1_Init(9600)]
by salvatore
14 Apr 2016 13:53
Forum: Development Boards
Topic: Timing RS232
Replies: 10
Views: 6567

Timing RS232

Hi, I am making tests with the serial RS232 present on board EasyPic5 with a PIC 16F887 and clocked at 8MHz (internal, no xtal) on which runs a program that sends every second all'USART Terminal of MikroBasicPRO. The serial program is setted at 9600 baud, but on the terminal to see something I have ...

Go to advanced search