Oh yeah, my mistake.. anyways, the power is suppose to be attach to the Op-amp and transistor Collector. This work, but it may (will) heat much.
Oh yeah, my mistake.. anyways, the power is suppose to be attach to the Op-amp and transistor Collector. This work, but it may (will) heat much.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
A look to µChip AN 1074 ... ??
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi, Malc
I tried to compile your project and get a strange error at compiling : PIR2 not found ...
which is the processor you use ? 767 or 676 ???
and is the posted "twin track controller" your source ???
the SPWM might run properly ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi,
I'm using the 16F676 - this is the code that I have (I think its the same as per the 1st post in this thread)
Compiles fine hereCode:@ __CONFIG _HS_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_OFF DEFINE OSC 20 ANSEL = %00010111 ' Set which ports are digital and which are analogue CMCON=7 ' Turm Comparitors off TRISA=%11111111 ' set PORTA as all input TRISC=%00000001 ' set PORTC as all output apart from RC0 DEFINE ADC_BITS 8 ' ADCIN resolution (Bits) DEFINE ADC_CLOCK 2 ' ADC clock source (Fosc/32) DEFINE ADC_SAMPLEUS 11 ' ADC sampling time (uSec) INCLUDE "DT_INTS-14.bas" ' Base Interrupt System INCLUDE "SPWM_INT.bas" ' Software PWM module DEFINE SPWM_FREQ 150 ' SPWM Frequency (Hz) DEFINE SPWM_RES 254 ' SPWM Resolution (0 - 255) DutyVar VAR byte[4] ' Array used to store ADC [channels] ASM SPWM_LIST macro ; Define Pin's to use for SPWM SPWM_PIN PORTC, 2, _DutyVar ; and the associated DutyCycle variables SPWM_PIN PORTC, 3, _DutyVar+1 ; (Additional channels DutyVar+2, +3 etc) endm SPWM_INIT SPWM_LIST ; Initialize the Pins ENDASM ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, SPWMhandler, ASM, yes endm INT_CREATE ; Creates the interrupt processor ENDASM @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts Main: ADCIN 0, DUTYVAR[0] ; if having more channels add ADCIN 2, DUTYVAR[2] etc ADCIN 1, DUTYVAR[1] GOTO Main ; program simply loops round reading ADC and sending corresponding PWM out
Opps.. just noticed in the 1st post I have the wrong pic stated in the header of the code - Sorry !
Hi, Malc
Sorry to sink your dreams ...
http://www.electroniquepratique.com/couve.php?id=43
The very bottom item ...
Alain
PS: its This Month issue !!!
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Don't you juts love bablefish !
Oh well.... just goes to show how good my concept was...
Regulator for railway model making
Ci to be downloaded: 32 MODFERCI.zip
If it is a field where electronics contributes an interesting share, it is well in model making. To our readers amateurs of railway circuits, we propose the realization of this regulator intended for the piloting of the machines of traction.
Extract of L’article page 32 of the Practical number 316’D Electronic:
We deliberately chose an operation close to reality. The rise to power as well as deceleration are extremely progressive by the placement of fifteen stages visualized by two-tone leds. The inversion of the direction of walk can be carried out only one time the stopped convoy. Lastly, this control panel also comprises a button of emergency braking...![]()
Bookmarks