Author |
Message |
Topic: ATMega 168 Fast PWM with Timer 2 |
autoguider
Replies: 4
Views: 619
|
Forum: BASCOM-AVR Archive Posted: Thu May 01, 2014 4:37 pm Subject: ATMega 168 Fast PWM with Timer 2 |
Hi Dave,
many thanks for the useful advice.
I changed the registers now to:
TCCR2A= &B10000011 ' Fast PWM, 1 0 Clear OC2A on Compare Match, set OC2A at BOTTOM
... |
Topic: ATMega 168 Fast PWM with Timer 2 |
autoguider
Replies: 4
Views: 619
|
Forum: BASCOM-AVR Archive Posted: Thu May 01, 2014 1:36 pm Subject: ATMega 168 Fast PWM with Timer 2 |
Dear All,
I cannot explain why my circuit does not work.
I want to use Timer 2 to generate a refernce voltage to control the dutycycle of a stepper motor.
The µC is PDIP casing. OC2A is on pin 17 ... |
Topic: Wait execution takes too long- Clock Source ? |
autoguider
Replies: 10
Views: 568
|
Forum: BASCOM-AVR Archive Posted: Tue Apr 22, 2014 11:04 pm Subject: Wait execution takes too long- Clock Source ? |
Dear Ian,
Thank you very much
In a former version of the program I needed INT1.
The directive enable INT1 is not necessary any more. I remove this remnant.
If I am correct then Pin 15 ( PCINT ... |
Topic: Wait execution takes too long- Clock Source ? |
autoguider
Replies: 10
Views: 568
|
Forum: BASCOM-AVR Archive Posted: Tue Apr 22, 2014 9:20 am Subject: Wait execution takes too long- Clock Source ? |
Dear All,
after further digging in the forum I followed a posting and removed the nosave directive at the declaration of the timer.
I did not change anything.
All WAIT commands are executed much lo ... |
Topic: Wait execution takes too long- Clock Source ? |
autoguider
Replies: 10
Views: 568
|
Forum: BASCOM-AVR Archive Posted: Sun Apr 20, 2014 7:30 pm Subject: Wait execution takes too long- Clock Source ? |
Dear Albert,
I think I am coming closer to the solution.
It seems that there is a conflict with INT1.
I am using INT 1 to generate a signal to start a measurement of temperature every 5 minutes.
... |
Topic: Wait execution takes too long- Clock Source ? |
autoguider
Replies: 10
Views: 568
|
Forum: BASCOM-AVR Archive Posted: Thu Apr 17, 2014 6:27 pm Subject: Wait execution takes too long- Clock Source ? |
Dear Paul,
I followed your advice and checked the clock output signal with an oscilloscope.
Result: The unit runs at 6 MHz. I got a wonderful powerful sinus wave with appr. 7V peak to peak.
So it ... |
Topic: Wait execution takes too long- Clock Source ? |
autoguider
Replies: 10
Views: 568
|
Forum: BASCOM-AVR Archive Posted: Wed Apr 16, 2014 11:37 pm Subject: Wait execution takes too long- Clock Source ? |
Dear Kim, Dear Albert,
many thanks for answering my posting.
@ Kim
Iam using a Diamex DX ISP USB programmer. It runs with the STK500 protocol.
Transfer of data and also of fusebit settings runs ... |
Topic: Wait execution takes too long- Clock Source ? |
autoguider
Replies: 10
Views: 568
|
Forum: BASCOM-AVR Archive Posted: Tue Apr 15, 2014 1:26 pm Subject: Wait execution takes too long- Clock Source ? |
Dear All,
I am running a ATMEGA 168 20 PU with a crystal rated at 6 MHz.
Crytstral is connected via 2 capacitors 22pf each to GND and the other direction goes to the XTAL1 and XTAL2 pins of the CP ... |
Topic: Powertip PC1602F B running 4Bit Mode Bascom ? |
autoguider
Replies: 3
Views: 213
|
Forum: BASCOM-AVR Archive Posted: Tue Apr 15, 2014 10:57 am Subject: Powertip PC1602F B running 4Bit Mode Bascom ? |
Dear all,
I changed to the lcd4busy_anypin.lbx library.
So I invested 1 additional pin at the cpu.
Most Important is to set the WR-pin to 0 before executing the initlcd procedure !
This is ... |
Topic: Powertip PC1602F B running 4Bit Mode Bascom ? |
autoguider
Replies: 3
Views: 213
|
Forum: BASCOM-AVR Archive Posted: Mon Mar 24, 2014 12:38 am Subject: Powertip PC1602F B running 4Bit Mode Bascom ? |
Daer Kim,
many thanks for your advice.
I tried your code.
I found out that the lcdinit is essential.
If I do not use it there is nothing displayed.
Whre I leave it the then I get the correct text ... |
Topic: Powertip PC1602F B running 4Bit Mode Bascom ? |
autoguider
Replies: 3
Views: 213
|
Forum: BASCOM-AVR Archive Posted: Sun Mar 23, 2014 8:52 pm Subject: Powertip PC1602F B running 4Bit Mode Bascom ? |
Dear All,
I am trying to get now my 2nd Powertip PC1602F B Display operating in 4 Bit mode on a AVR 168 Mega@ 6 MHz ( Fuse Bits are checked)
Sometimes I get some correct data displayed. But then the ... |
Topic: Running LCD Display 4 Bit Mode Libraries ? Init ? |
autoguider
Replies: 13
Views: 569
|
Forum: BASCOM-AVR Archive Posted: Sat Nov 23, 2013 12:31 am Subject: Running LCD Display 4 Bit Mode Libraries ? Init ? |
Dear Albert,
many thaks for your efforts and recommendations.
Here is a link to the datasheet of the display: http://www.datasheetarchive.com/PC1602-F-datasheet.html
So far I have not tried an ot ... |
Topic: Running LCD Display 4 Bit Mode Libraries ? Init ? |
autoguider
Replies: 13
Views: 569
|
Forum: BASCOM-AVR Archive Posted: Fri Nov 22, 2013 2:58 pm Subject: Running LCD Display 4 Bit Mode Libraries ? Init ? |
Dear Alberet,
here is the source text:
'$PROG &HFF,&HF7,&HDF,&HFF' generated. Take care that the chip supports all fuse bytes.
$lib "mcs.lbx"
$regfile = "m168def.dat" ... |
Topic: Running LCD Display 4 Bit Mode Libraries ? Init ? |
autoguider
Replies: 13
Views: 569
|
Forum: BASCOM-AVR Archive Posted: Thu Nov 21, 2013 8:24 pm Subject: Running LCD Display 4 Bit Mode Libraries ? Init ? |
Dear Albert,
sorry about the lack of information.
Here it comes:
It is the default lib
wr is connected to ground
There is a 6 MHz crystal in operation. No division of the external clock.
be ... |
Topic: Running LCD Display 4 Bit Mode Libraries ? Init ? |
autoguider
Replies: 13
Views: 569
|
Forum: BASCOM-AVR Archive Posted: Sun Nov 17, 2013 8:42 pm Subject: Running LCD Display 4 Bit Mode Libraries ? Init ? |
Dear All,
many thanks for your advice.
In the meantime I got the LCD working in 4 bit mode.
I found some behaviour of the display which is strange to me.
If there is a wait command after data ... |
|