ON 20040417@11:24:39 PM at page: http://www.piclist.compiclist/questions.htm#38094.0481828704 James Newton[JMN-EFP-786] published post 38094.0481828704 parvatisirwar@yahoo.com asks: " i want to measure the frquency of an output wave form and display that in terms of rms the frequncy range is from .75Hz to 14hz,can u please help out" |Delete 'P-' before: '' but after: 'just_abadi@hotmail.com asks:
Hi and thanks for reading!|Delete 'P-' before: '' but after: 'abedalraouf@yahoo.com asks:
I need to know the features of PIC 18 F family that provides over the PIC 16F877 ,& which one you recommend to use for a Wireless Home pic-based sysem ?
it will be better if u give me any link talks deeply about dealing with PIC 16F877 and how it could be programmed,Thanks
dear sir,,|Delete 'P-' before: '' but after: 'dudasz@matav.pecs.hu asks:
i want an program example to enable me from learn how i can built aprogram on 16f876 especially when i use stepper motor may i controll in 8 stepper by this pic "16f876"
thanks for your cooperation
I installed this counter with wm-c1601m-1tnnc LCD.|Delete 'P-' before: '' but after: 'srousseau@comlab.com asks: " Wich type of LCD may I use? S6A0069, HD44780 or other?" |Delete 'P-' before: '' but after: 'dewiguanyin@hotmail.com asks:
The LCD shows some black square, and nothing all.
Have You any idea what is the problem with this circuit?
http://www.wintek.com.tw/ModuleList.asp?LcmType=&DispType=CHARACTER&ModuleNo=WM-C1601M-1TNNc
Can anyone please tell me how to do a program using JAL on programming an alarm clock. I am using a 4 x 4 matrix keypad and a HD44780 LCD. Please, anyone reply A.S.A.P. Thank you and have a nice day:)
I have a DS1302 wired to a PIC18F452.
I can't seem to get it to work. This program sets the time and tries to read it every second. The output is 165:165:165
It won't tick. Any Ideas?
remove spamsucks from email address. Thanks
'Define I/O pins and RTC variables
INCLUDE "modedefs.bas"
' Upper case serial filter.
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 9600
DEFINE SHIFT_PAUSEUS 100
Clk VAR PORTB.5
Dta VAR PORTB.4
RTCCS VAR PORTB.2
w1 VAR BYTE
tens VAR BYTE
ones VAR BYTE
RTCCmd VAR BYTE
Value VAR BYTE
Seconds VAR BYTE
Minutes VAR BYTE
Hours VAR BYTE
Date VAR BYTE
Month VAR BYTE
Day VAR BYTE
Year VAR BYTE
Idx VAR BYTE
'Define RTC Command Constants
SecReg CON %00000
MinReg CON %00001
HrsReg CON %00010
DateReg CON %00011
MonReg CON %00100
DayReg CON %00101
YrReg CON %00110
CtrlReg CON %00111
TChgReg CON %01000
BrstReg CON %11111
'Define Days-Of-Week, Months and AM/PM text.
'All text is stored in EEPROM with a binary 0 as the end-of-text character
Sun Data "Sun",0
Mon Data "Mon",0
Tue Data "Tues",0
Wed Data "Wednes",0
Thu Data "Thurs",0
Fri Data "Fri",0
Sat Data "Satur",0
Jan Data "January",0
Feb Data "February",0
Mar Data "March",0
Apr Data "April",0
May Data "May",0
Jun Data "June",0
Jul Data "July",0
Aug Data "August",0
Sep Data "September",0
Oct Data "October",0
Nov Data "November",0
Dcm Data "December",0
AM Data " AM",0
PM Data " PM",0
'Set I/O pin states and directions
'OUTS = %0000000000000000 'All logic low
'DIRS = %0000000000000111 'I/O 0,1 and 2 are output, rest are input
Initialize:
'Set Time and Date to 05/18/98 - 3:00 PM
'NOTE: Date must be set only once for every power-up of DS1302 chip.
Day = 02 'Monday
Month = 05 'May
Date = 18 '18th
Year = 98 '1998
Hours = 3 '3:00 PM (in 24-hour mode)
Minutes = 30
Seconds = 15
'TRISA.0 = 0 ' LED out
'TRISB.2 = 0 ' RTCCS
'TRISB.5 = 0 ' DTA
'LATB.5 = 0
'TRISB.4 = 1
intcon2.7 = 0 ' Enable PORTB pullups
'ADCON1 = 7
Low RTCCS ' Reset RTC
Low Clk
GoSub SetTime
Loop:
'Read out all date and time values and display them in two formats on
PORTA.0 = 1
Pause 1000
GoSub GetTime
GoSub PrintTime
PORTA.0 = 0
Pause 1000
GoTo Loop
'==================== DS1302 Real-Time Clock Subroutines ===================
PrintTime:
HSerout [ DEC Hours, ":",DEC Minutes , ":", DEC Seconds, $0D, $0A]
Return
WriteRTCRAM:
'Write to DS1302 RAM Register
RTCCS = 0
ShiftOut Dta, Clk, LSBFIRST, [%0\1,RTCCmd\5,%11\2,Value]
RTCCS = 1
Return
GetTime:
High RTCCS
ShiftOut Dta, Clk, LSBFIRST, [$bf] ' Read all 8 RTC registers in burst mode
ShiftIn Dta, Clk, LSBPRE, [Seconds,Minutes,Hours,Date,Month,Day,Year]
Low RTCCS
'Convert Time from BCD to decimal
w1 = Seconds
Tens = w1 & %11110000
Tens = Tens >> 4
Tens = Tens * 10
Ones = w1 & %00001111
w1 = Tens + ones
Seconds = w1
w1 = Minutes
Tens = w1 & %11110000
Tens = Tens >> 4
Tens = Tens * 10
Ones = w1 & %00001111
w1 = Tens + ones
Minutes = w1
w1 = Hours
Tens = w1 & %11110000
Tens = Tens >> 4
Tens = Tens * 10
Ones = w1 & %00001111
w1 = Tens + ones
Hours = w1
Return '[ rtcsec, rtcmin, rtchr, rtcdate, RtcMo, rtcday, RtcYr, 0]
WriteRTC:
'Write to DS1302
High RTCCS
ShiftOut Dta, Clk, LSBFIRST, [%0\1,RTCCmd\5,%10\2,Value]
Low RTCCS
Return
ReadRTCBurst:
'Read all time-keeping registers in one burst
High RTCCS
ShiftOut DTA, Clk, LSBFIRST, [%1\1,BrstReg\5,%10\2]
ShiftIn DTA, Clk, LSBPRE, [Seconds,Minutes,Hours,Date,Month,Day,Year]
Low RTCCS
Return
ReadRTCRAM:
'Read DS1302 RAM Register
High RTCCS
ShiftOut DTA, Clk, LSBFIRST, [%1\1,RTCCmd\5,%11\2]
ShiftIn DTA, Clk, LSBPRE, [Value]
Low RTCCS
Return
SetTimeAndDate:
'Write time values into all time-keeping registers, being sure to clear
'the write-protect bit in CtrlReg before the write, and set the
'write-protect bit after the write
For Idx = 0 TO 8
LookUp2 Idx,[0,Seconds,Minutes,Hours,Date,Month,Day,Year, 128], Value
LookUp Idx,[CtrlReg, SecReg, MinReg, HrsReg, DateReg, MonReg, DayReg, YrReg, CtrlReg],RTCCmd
GoSub WriteRTC
Next
Return