ATTiny13 PWM not working

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
ivanscm
Posts: 4
Joined: 26 Sep 2012 13:52
Location: Kazahstan
Contact:

ATTiny13 PWM not working

#1 Post by ivanscm » 26 Sep 2012 14:16

ATTiny13A, this code does not work in the simulator Proteus. This code does not work in the real circuit. I checked oscilloscope.

Code: Select all

program MyProject;

begin
  DDB0_bit := 1;
  DDB1_bit := 1;
  PWM1_Init(_PWM1_PHASE_CORRECT_MODE, _PWM1_PRESCALER_1, _PWM1_NON_INVERTED, 16);
  PWM1_Start();

  while TRUE do
  begin
     Delay_ms(50);
     PWM1_Set_Duty(255);
     Delay_ms(50);
     PWM1_Set_Duty(128);
  end;
end.
Wanted to buy a compiler, but ran into a trouble, let's face together.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: ATTiny13 PWM not working

#2 Post by filip » 28 Sep 2012 14:39

Hi,

I apologize for the inconvenience, there is an issue with the library.
I have informed our developers and it should be corrected as soon as possible.

Regards,
Filip.

ivanscm
Posts: 4
Joined: 26 Sep 2012 13:52
Location: Kazahstan
Contact:

Re: ATTiny13 PWM not working

#3 Post by ivanscm » 28 Sep 2012 18:17

I also have problems with the code:

Code: Select all

Delay_ms(2000);
Sound_Init(PORTB,3);
Sound_Play(100, 1000);
mikropascal 0 360 Unresolved extern 'HWMul_32x32' __Lib_Sound.mpas
Compiler version: 4.60

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: ATTiny13 PWM not working

#4 Post by filip » 01 Oct 2012 09:44

Hi,

Could you please use the latest version of the compiler, 5.60, available from here :
http://www.mikroe.com/mikropascal/avr/

Regards,
Filip.

Post Reply

Return to “mikroPascal PRO for AVR General”