You may insert @POP before goto. Do not force "STKPTR = 0" and let PIC control STKPTR. Please let me know whether @POP can fix the problem.
Type: Posts; User: Yuantu Huang; Keyword(s):
You may insert @POP before goto. Do not force "STKPTR = 0" and let PIC control STKPTR. Please let me know whether @POP can fix the problem.
Hi Tom,
You can try goto instead of gosub and change 'pause n' into
for i = 1 to n
pause 1
next i
everywhere except inside of the interrupt subroutinue. Of course, if statements...
Hi Tom,
The problem might be caused by gosub, which might take too much time, because PBP uses very latency interrupt implementation, and it never jumps into interrupt subroutinue within gosub....
You should initialise the INTEDG bit of OPTION_REG. If you would like to make falling edge interrupt, just add OPTION_REG.6 = 0 after INTCON = %10010000
Hi Allan,
I am using PIC16F737 internal clock 8MHz, Card 1 is connected to RA6 and RA7, Cards 2, 3, and 4 are connected to PORTC<0:2,5:7>, and Cards 5,6,7,and 8
are connected to PORTB. All 16...
Hi Steve,
I thought FLAGS was a pseudo flag. Now I understand FLAGS = 0 is a LCD reset statement. It is working.
Thank you and Ingvar for your help.
Hi Ingvar,
Thank you very much. You are right. The LCD needs to be reset after the power is restored. I can use
lcdout $fe,$38
lcdout $fe,$0c
lcdout $FE, 1
to restore 8 data line LCD...
Dear Sir,
The LCD works fine as long as the power is supplied non-stop. However, when I turn LCD power off and turn on again, LCD displays two line black square forever, similar to power on first...
Hi kasapo,
Quick question. I am using 5V power supply for PIC, but sa25f160 uses maximum 3.6V. Is it possible to communicate each other?
Thank you.
Hi Ron & kasapo,
Thank you very much.
I will visit the web site you provided. Our products may have 5000-10000 units per year. So I need to take some time to make a decision whether we use...
Hi Ron & kasapo,
I am interested in MMC card too. Could you please present a piece of code how PIC reads and writes from/to MMC card? I am using EEPROM which seems not good enough (two small). My...
Hi Melanie,
Thank you very much.
Hi Ralph & Melanie,
How to calculate the elapsed hours between 16:30:45 (HH:MM:SS), 28/05/2005 (DD/MM/YYYY) and 02:26:38, 01/08/2004.
Assume the elapsed time is limited to less than one year....
Dear All,
My application needs interrupt using "Resume Label" statement to do the special job. However, it can only do 27 times for me, then resets doing 27 times job again, and then stops...
Dear Felch,
Thank you very much for your code. I am now implementing 8 card readers (both Track2 and variable length Weigand) on a single 16F737 using PICbasic Pro. Currently I have a problem for...
Dear Felch,
I am interested in your work. Could you please post your Weigand code? Thank you.
Dear Steve,
I made it working as your suggestion although sometimes it doesn't go (seems no clock, it may be the circuit board problem). The following is the change of the code and cofiguration:
...
Dear All,
The following code works fine for 16F777, but not work for 18F4525. Hope to get helps from you. The Led is flashing OK, but I2C, Serout, and string ABC do not work at all. Note that the...
Dear Steve,
Please find EMI block digram in the attachment. Now use two 8 bit latchs (74HC/HCT373) instead of one16 latch. The SRAM is CY7C1020CV33 and the flash EEPROM is AM29LV160D.
Thank you...
Dear All,
I read the PIC18F8X20 datasheet and AN869, and found some ASM and C sample code of External Memory Interface (EMI).
I have no idea how to use PBP and PIC18F8X20 to access up to 2MB...