Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 01, 2024, 12:17:43 00:17


Login with username, password and session length


Pages: [1]
Print
Author Topic: Please help me ! I can't use Timer 0 with Pic 16F877 in Flowcode....  (Read 5428 times)
0 Members and 1 Guest are viewing this topic.
chithanh04dt2
Junior Member
**
Offline Offline

Posts: 63

Thank You
-Given: 97
-Receive: 9


« on: October 01, 2008, 04:30:15 04:30 »

Hello anyone Smiley
I'am Vietnammese and i only starter learn PIC Angry.  I have a problem with Pic 16f877. When i used Flowcode for PIC to programming LED flasher on RB port, i used timer0 interrupt. It seem very well with Flowcode simulation  Grin, but when i used Proteus and opened file PICDEM2+ with PIC16F877 (C:\Program Files\Labcenter Electronics\Proteus 7 Professional\SAMPLES\VSM MPLAB Viewer\Eval Boards\PICDEM2+ with PIC16F877), a problem happen. It is not true. Huh

My teacher have kit PICDEM2 Plus but i want test my code first with Proteus. Can you help me why differrent Flowode vs Proteus.

Here my files:



Thank in advance.

chithanh04dt2
Logged

Sorry for my English.
Regard !
Robi
Newbie
*
Offline Offline

Posts: 20

Thank You
-Given: 54
-Receive: 1


« Reply #1 on: October 01, 2008, 03:00:22 15:00 »

chithanh04dt2, the key instructions in your code are:   

option_reg.T0CS=1;
option_reg.T0SE=1;

that both make Timer 0 incrementing on high-to-low transitions on T0CKI pin.
You must ensure that an external clock drives the pin RA4/T0CKI to get it working.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC