Search found 26 matches
- 08 Jul 2009 12:50
- Forum: mikroPascal General
- Topic: Watchdog prescaler
- Replies: 0
- Views: 1726
Watchdog prescaler
Hi, how can i set up a prescaler for a whatchdog every 1 second? Is it possible? for example, consider a function that needs 500ms to process an information. can I set to 700ms or more the watchdog? I know that I can put clrwdt inside a cycle etc... but I need to understand the way above. Can you gi...
- 05 Jul 2009 15:07
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
hello, this is the code for DSPIC30F6014A, xtal 10 Mhz, clock 40 Mhz, I use Timer1 interrupt at every 1ms for Uart1 timeout and interrupt for Uart1 program Uart_Interrupt; var Uart1_buffer : array[256] of byte; Int_pt, Read_pt : word; Uart1_overflow : word; Uart_data : string[256]; i : word; proced...
- 03 Jul 2009 16:10
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
- 03 Jul 2009 09:08
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
- 03 Jul 2009 09:07
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
Hi, Follows in your code my comments (some are just warning, probably do not create the problem). I think the problem is in the WHILE LOOP. What I suppose you intend: stay receiving at MyTxt all chars from a message and at it's end, send it to LCD and wait 3 seconds. But Uart1_Data_Ready() = 1 ONLY...
- 01 Jul 2009 07:58
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
hi, its is possible to send us complete and compilable code with wich pic you use and the chip config. So we can try that on our board... What i see now is a procedure, a ISR and a main program who never call the procedure... we will more helpfull with a bit more info ))) You can consider the examp...
- 30 Jun 2009 18:44
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
Could be the problem?
I forgot a thing. I'm using an interrupt also.. could be a problem for the UART? procedure Timer1Int; org $1A; begin //** it is necessary to clear manually the interrupt flag: IFS0 := IFS0 and $FFF7; // Clear TMR1IF //** user code starts here //** user code ends here end; then the main program begin...
- 30 Jun 2009 18:13
- Forum: mikroPascal General
- Topic: Problem using Uart
- Replies: 13
- Views: 7339
Problem using Uart
Hello, I'm trying to recive and process commands using Uart, but I didn't understand the reason why I'm receiving only a part of commands , then if I try to send the same command I receive wrong datas. In a loop I call the procedure below every 500 ms, and if a command like "DS_0001" is arriving fro...
- 29 Jun 2009 10:36
- Forum: mikroPascal General
- Topic: Daysbetween
- Replies: 4
- Views: 2840
Hello Gianluca, You must have the installation date stored into EEprom. function Date2NTP(year_ : word; month_, day_, hour_, min_, sec_: byte) : dword; var day_buf : word; begin result := year_ - 1970; result := result*365 + (result div 4); case month_ of 1 : day_buf := day_; 2 : day_buf := day_ + ...
- 29 Jun 2009 07:50
- Forum: mikroPascal General
- Topic: Daysbetween
- Replies: 4
- Views: 2840
- 27 Jun 2009 10:28
- Forum: mikroPascal General
- Topic: Daysbetween
- Replies: 4
- Views: 2840
Daysbetween
Hello guys..
I have a little problem.
I need to count the elapsed days between two dates.
Is not inportat to consider if a year is a leap year or not, but I need to show a warning message when a period about 3 years has expired starting from the installation date of the device.
Any Idea?
many thanks
I have a little problem.
I need to count the elapsed days between two dates.
Is not inportat to consider if a year is a leap year or not, but I need to show a warning message when a period about 3 years has expired starting from the installation date of the device.
Any Idea?
many thanks
- 18 Jun 2009 16:35
- Forum: mikroPascal General
- Topic: Increment
- Replies: 1
- Views: 1972
Increment
Hi guys,
I have an array of word like this:
every certain time I need to increment the value, so for example I need to change it in '00000002', then '00000003' etc...
Could someone help me please?
I have an array of word like this:
Code: Select all
wfilename: array[8] of word;
wfilename:='00000001';
Could someone help me please?
- 20 May 2009 08:56
- Forum: mikroPascal General
- Topic: DS18S20 Where is the mistake?
- Replies: 7
- Views: 5339
How long is the cable to the sensor? What is the value of the pull-up resistor? Do you use phantom powering or a 3-wires connection with separate power? You hopefully do not use a 2-wires shielded cable and use the shield as ground? No current shall flow over a shield; if you do, you transfer a lot...
- 20 May 2009 08:03
- Forum: mikroPascal General
- Topic: DS18S20 Where is the mistake?
- Replies: 7
- Views: 5339
Hi! Instead of calculating CRCs and so forth, I used always this simple method: I accept only changes in readings of +/-2°C. If the change is bigger, I ignore it. This works fine and filters out some accidental mis-readings. But reading checksum is surely more reliable. I agree with you, yesterday ...
- 19 May 2009 13:53
- Forum: mikroPascal General
- Topic: DS18S20 Where is the mistake?
- Replies: 7
- Views: 5339