Calling all code necks for help..

Everything technical about radio can be discussed here, whether it's transmitting or receiving. Guides, charts, diagrams, etc. are all welcome.
radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Calling all code necks for help..

Post by radio-berlin » Sat Nov 21, 2015 8:16 am

Can anybody please help me

Ive found a nice little soure code for motorola mc145170 online which id like to experiment with however I cant seem to assemble it to hex. It throws up a lot of errors saying Ports are undifined etc, Ive been through it but to be honest im struggling to understand it
Ill post source code here and then the list of errors im getting, could somebody please point me in right diretion :-) Thanks in advance

Heres the code:

;********************************************************************************
;
; Original program by Richard Hosking (e-mail - ???) using pic16c57
; Modify by LZ4ZD Zlatan Dimitrov ([email protected]) using pic16f84
;
; This program drive mc145170 Motorola PLL Serial Synthesizer
; from 87.6-108.0 (FM Broadcast Band) in 100kHz steps
;
; Freq is selected with DIP switch conected to RB0:RB7 (with pull-up resistors to Vdd)
; MCLR (reset) shift selected freq in synthesizer
; ENB is RA0
; CLK is RA1
; DATA is RA2
;
; 4MHz Xtal
;
LIST p=16f84, n = 66
include "p16f84.inc"
__FUSES _XT_OSC & _PWRTE_ON & _WDT_OFF & _CP_OFF

carry equ 0 ; Carry bit in status register

temp equ 8 ; Register for temporary data
temp_1 equ 9


divider_hi equ 0E ; Address of current synth data
divider_lo equ 0F ; N divider

tx_hi equ 12 ; Address of tx freq data
tx_lo equ 13 ; N counter

synth_enable equ 0 ; Synthesizer enable bit port A
synth_clock equ 1 ; Synthesizer data clock bit port A
synth_data equ 2 ; Synthesizer data bit port A

configure equ 64 ; Configuration setup for synth
; Bit 7 0 Polarity unchanged
; Bit 6 1 Differential phase det
; Bit 5 1 Lock detect enable
; Bits 432 001 Ref out enable divide by 1
; Bit 1 0 Fv disable
; Bit 0 0 Fr disable

counter equ 20 ;wait counter

;********************************************************************
start
;
;********************************************************************
;
; Routine to initialize ports
;
;********************************************************************

clrf PortA
clrf PortB
bsf Status,RP0
movlw 0x00 ;Define PortA as output
movwf TrisA

movlw 0xff ;Define PortB as input
movwf TrisB

bcf Status,RP0

bcf portA,synth_clock ; Clock low initially
bsf portA,synth_enable ; Enable high initially
nop
nop
bcf portA,synth_enable ; and then low to allow data to synth
movlw configure ; Configuration word for synth
movwf temp
movlw 08 ; 8 bits
movwf temp_1

loop_configure
rlf temp,f
btfsc status,carry ; Write bit to port A
bsf portA,synth_data
btfss status,carry
bcf portA,synth_data
bsf portA,synth_clock ; Clock data
bcf portA,synth_clock
decfsz temp_1

goto loop_configure ;

bsf portA,synth_enable ; Latch data to synth

;*******************************************************************************
;
; Programing Register R
;

movlw 07 ; first 7 bits low of 15 bits
movwf temp ; Reference divide by 40 (028h)
bcf portA,synth_enable
loop_2 ; to give 100 KHz steps from 4 MHz clock
bcf portA,synth_data ; Data low
bsf portA,synth_clock ; Clock data into synthesizer
bcf portA,synth_clock
decfsz temp
goto loop_2

bcf portA,synth_data ; Data=0
bsf portA,synth_clock ; 0
bcf portA,synth_clock
bsf portA,synth_clock ; 0
bcf portA,synth_clock

bsf portA,synth_data ; Data=1
bsf portA,synth_clock ; 1
bcf portA,synth_clock ;
bcf portA,synth_data ; Data=0
bsf portA,synth_clock ; 0
bcf portA,synth_clock
bsf portA,synth_data ; Data=1
bsf portA,synth_clock ; 1
bcf portA,synth_clock
bcf portA,synth_data ; Data=0
bsf portA,synth_clock ; 0
bcf portA,synth_clock
bsf portA,synth_clock ; 0
bcf portA,synth_clock
bsf portA,synth_clock ; 0
bcf portA,synth_clock

bsf portA,synth_enable ; Data to R reg

;***************************************************************************
;
; Reading DIP Switch
;
;***************************************************************************

movlw 0x6C
movwf tx_lo
movlw 0x03
movwf tx_hi

movf PortB,w
addwf tx_lo,f
btfsc status,carry
incf tx_hi,f

call synthesizer

sleep

;***************************************************************************
;
; Synthesizer routine
; Writes 17 bits of data to the A and M dividers
; to update the synthesizer
; A data 7 bits, MSB first followed by M data 10 bits MSB first
;
synthesizer

;

movf tx_hi,w ; tx_rx bit high = transmit
movwf divider_hi
;
movf tx_lo,w
movwf divider_lo
;
movlw 08 ; Count for software loop
movwf temp ; 16 bits to update synth divider
bcf portA,synth_clock ; Clock must be low initially
bcf portA,synth_enable ; Enable must be low to load data
;
loop_hi
rlf divider_hi ; Move bit from divider data into carry
btfsc status,carry ; and then to synthesizer
bsf portA,synth_data
btfss status,carry
bcf portA,synth_data
bsf portA,synth_clock ; Clock data to synthesizer on pos transition
bcf portA,synth_clock ; and reset for next bit
decfsz temp ; next bit
goto loop_hi
;
movlw 08 ; count for lo byte
movwf temp
loop_lo
rlf divider_lo ; Same for M byte
btfsc status,carry
bsf portA,synth_data
btfss status,carry
bcf portA,synth_data
bsf portA,synth_clock
bcf portA,synth_clock
decfsz temp
goto loop_lo
;
bsf portA,synth_enable ; Enable bit low to restart synthesizer
retlw 0 ; Return


;***************************************************************************
;
; Wait
;
wait

movlw 0xff
movwf counter
kill decfsz counter
goto kill
return

end
;************************
;
; COOL ;-)
;
;************************


Heres the errors im getting:
Make: The target "C:\Users\Thinkpad\Desktop\16f84 asm motorola.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84 "16f84 asm motorola.asm" /l"16f84 asm motorola.lst" /e"16f84 asm motorola.err" /d__DEBUG=1
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 56 : Symbol not previously defined (PortA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 57 : Symbol not previously defined (PortB)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 58 : Symbol not previously defined (Status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 60 : Symbol not previously defined (TrisA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 63 : Symbol not previously defined (TrisB)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 65 : Symbol not previously defined (Status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 67 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 68 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 71 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 79 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 80 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 81 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 82 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 83 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 84 : Symbol not previously defined (portA)
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 85 : Using default destination of 1 (file).
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 89 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 98 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 100 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 101 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 102 : Symbol not previously defined (portA)
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 103 : Using default destination of 1 (file).
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 106 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 107 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 108 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 109 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 110 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 112 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 113 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 114 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 115 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 116 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 117 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 118 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 119 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 120 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 121 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 122 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 123 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 124 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 125 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 126 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 127 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 129 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 142 : Symbol not previously defined (PortB)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 144 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 170 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 171 : Symbol not previously defined (portA)
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 174 : Using default destination of 1 (file).
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 175 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 176 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 177 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 178 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 179 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 180 : Symbol not previously defined (portA)
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 181 : Using default destination of 1 (file).
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 187 : Using default destination of 1 (file).
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 188 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 189 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 190 : Symbol not previously defined (status)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 191 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 192 : Symbol not previously defined (portA)
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 193 : Symbol not previously defined (portA)
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 194 : Using default destination of 1 (file).
Error[113] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 197 : Symbol not previously defined (portA)
Message[305] C:\USERS\THINKPAD\DESKTOP\16F84 ASM MOTOROLA.ASM 209 : Using default destination of 1 (file).
Halting build on first failure as requested.

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Sat Nov 21, 2015 11:33 am

Its ok ignore this post, think ive sorted it. The ports seem to be case sensitive

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Re: Calling all code necks for help..

Post by pjeva » Sat Nov 21, 2015 12:15 pm

Since it is from internet, could you post schematic, or link to this?


Sent from my iPhone using Tapatalk

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Sat Nov 21, 2015 1:34 pm

pjeva wrote:Since it is from internet, could you post schematic, or link to this?
http://www.qsl.net/l/lz4zd/site_index.html

click ham radio and its there

User avatar
Analyser
tower block dreamin
tower block dreamin
Posts: 319
Joined: Fri Sep 26, 2014 9:11 pm

Re: Calling all code necks for help..

Post by Analyser » Sun Nov 22, 2015 1:17 am

radio-berlin wrote:Its ok ignore this post, think ive sorted it. The ports seem to be case sensitive
That's correct, they are.

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Sun Nov 22, 2015 10:21 pm

Analyser, If I just make it all uppercase would that be ok?

Ive tried compiling with it all in upper case and it builds fine but with lots of warnings, I burn to pic and its not working. I have a a working circuit with a programmed pic that works but its code protected, when I swap for the one ive burnt it doesnt work.

Would you fancy compiling the source code for me if I give you a board in return, or RDS or anything you want

User avatar
Analyser
tower block dreamin
tower block dreamin
Posts: 319
Joined: Fri Sep 26, 2014 9:11 pm

Re: Calling all code necks for help..

Post by Analyser » Sun Nov 22, 2015 11:12 pm

radio-berlin wrote:Analyser, If I just make it all uppercase would that be ok?

Ive tried compiling with it all in upper case and it builds fine but with lots of warnings, I burn to pic and its not working. I have a a working circuit with a programmed pic that works but its code protected, when I swap for the one ive burnt it doesnt work.

Would you fancy compiling the source code for me if I give you a board in return, or RDS or anything you want
All uppercase should work, what kind of warnings are you getting?
Also, are you sure the pinouts to the MC145170 are correct? The working pic you're looking at may have different pinouts to the software you've just tried to burn.

User avatar
Analyser
tower block dreamin
tower block dreamin
Posts: 319
Joined: Fri Sep 26, 2014 9:11 pm

Re: Calling all code necks for help..

Post by Analyser » Sun Nov 22, 2015 11:21 pm

Analyser wrote:
radio-berlin wrote:Analyser, If I just make it all uppercase would that be ok?

Ive tried compiling with it all in upper case and it builds fine but with lots of warnings, I burn to pic and its not working. I have a a working circuit with a programmed pic that works but its code protected, when I swap for the one ive burnt it doesnt work.

Would you fancy compiling the source code for me if I give you a board in return, or RDS or anything you want
All uppercase should work, what kind of warnings are you getting?
Also, are you sure the pinouts to the MC145170 are correct? The working pic you're looking at may have different pinouts to the software you've just tried to burn.
Another thing I forgot to mention is the crystal frequency has to be correct (4MHz) and you need to have the master clear pin at +5v for this software to work (pin4 IIRC).

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Sun Nov 29, 2015 4:52 pm

Thanks for you help analyser. Ive reall struggled to get this working, but finally sussed what my problems were.
First problem was my 4mhz crystal.. I had it connected to OSC 1 & 2 connections on pic chip with link to osc in on motorola. It didnt like this and im not sure why. Ive now got xtal on the motorola with a link to osc in on pic chip

2nd problem was I was overdriving the RF in on the motorola.

Also the switches are low when not in use and are pulled high to 5+ when used, the top of the source code is not very clear on this.. as I originally had them all high and was pulling low to use.

Now ive got two more problems.

First problem is the time it takes to inatalise, Its taking approx 16 seconds before it kick in or starts to adjust voltage.. I cant find in the source where to chage this

2nd Problem is the source code low frequency is 87.6 and I would like 87.5, again I cant figure it out in the source code, could somebody please point me in the right direction

Thanks in advance. One ive completed this ill post up schematics and code etc.

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Re: Calling all code necks for help..

Post by pjeva » Sun Nov 29, 2015 9:55 pm

Counter equ20 is waiting time before it starts to work...


Sent from my iPhone using Tapatalk

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Sun Nov 29, 2015 10:19 pm

The only place I can see that counter used is right at the end before Kill. If tried changing the variable and ching the word 'counter' at the end for a hexidecimal number but the circuit still take around 16 seconds regardless.. There must be more to it?

User avatar
Analyser
tower block dreamin
tower block dreamin
Posts: 319
Joined: Fri Sep 26, 2014 9:11 pm

Re: Calling all code necks for help..

Post by Analyser » Mon Nov 30, 2015 12:13 am

radio-berlin wrote:The only place I can see that counter used is right at the end before Kill. If tried changing the variable and ching the word 'counter' at the end for a hexidecimal number but the circuit still take around 16 seconds regardless.. There must be more to it?
What are you doing with the master clear pin? It should normally be tied to positive for the chip to run but the code says you need to hold it low to send the code to the pll. There doesn't seem to be anything in the code which is causing a delay of 16 seconds so it either sounds like a clock problem or you've left the master clear pin floating and that's the time its taking for the internal capacitance discharge before getting low enough to trigger low.
Sorry, I can't help with the 875 thing.

pjeva
no manz can test innit
no manz can test innit
Posts: 238
Joined: Tue Aug 26, 2014 9:59 pm

Calling all code necks for help..

Post by pjeva » Mon Nov 30, 2015 9:02 am

You have it at the begining after setup for synth. Maybe your crystal is not exactly 4MHz so delay is shorter than 20s...


Sent from my iPhone using Tapatalk

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Mon Nov 30, 2015 9:46 am

pjeva wrote:You have it at the begining after setup for synth. Maybe your crystal is not exactly 4MHz so delay is shorter than 20s...

The part your referring to at the beginning is just a variable, it's assigning 20 the the variable called counter. I've tried changing it as a variable and I've also tried removing 'counter' where it's called for at end of the code and changed it for a figure. Still takes ages to kick in

The memory clear is tied high to 5v, it doesn't do anything or lock when pulled to ground. Earlier post analyser you said it had to be tied high?

I've got the 87.5 problem sorted. It's just the time it takes to kick in. It's spidered wired at mo so maybe it's my clock line between the ic's, I'll try a new layout a bit later and see if makes a difference.

Thanks for help

Sent from my iPhone using Tapatalk

User avatar
Analyser
tower block dreamin
tower block dreamin
Posts: 319
Joined: Fri Sep 26, 2014 9:11 pm

Re: Calling all code necks for help..

Post by Analyser » Mon Nov 30, 2015 9:59 am

pjeva wrote:You have it at the begining after setup for synth. Maybe your crystal is not exactly 4MHz so delay is shorter than 20s...


Sent from my iPhone using Tapatalk
If you're referring to the 'counter equ 20' above Start at the top of the code, it's just defining the memory location for 'counter'. In fact, I can't see the 'wait' subroutine called for anywhere so I don't think counter is used at all. I suspect a hardware problem.

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Mon Nov 30, 2015 10:50 am

Analyser wrote:
pjeva wrote:You have it at the begining after setup for synth. Maybe your crystal is not exactly 4MHz so delay is shorter than 20s...


Sent from my iPhone using Tapatalk
If you're referring to the 'counter equ 20' above Start at the top of the code, it's just defining the memory location for 'counter'. In fact, I can't see the 'wait' subroutine called for anywhere so I don't think counter is used at all. I suspect a hardware problem.
Wait and counter are called for right at the end of the code just before kill

User avatar
Analyser
tower block dreamin
tower block dreamin
Posts: 319
Joined: Fri Sep 26, 2014 9:11 pm

Re: Calling all code necks for help..

Post by Analyser » Mon Nov 30, 2015 11:32 am

radio-berlin wrote:
Analyser wrote:
pjeva wrote:You have it at the begining after setup for synth. Maybe your crystal is not exactly 4MHz so delay is shorter than 20s...


Sent from my iPhone using Tapatalk
If you're referring to the 'counter equ 20' above Start at the top of the code, it's just defining the memory location for 'counter'. In fact, I can't see the 'wait' subroutine called for anywhere so I don't think counter is used at all. I suspect a hardware problem.
Wait and counter are called for right at the end of the code just before kill
I can see that, but the 'wait' is a subroutine which isn't called for anywhere else in the code. If you can find a 'call wait' command then I have missed it. Before that the code calls for synthesizer then goes to sleep so it naturally skips wait at the end.

Shedbuilt
no manz can test innit
no manz can test innit
Posts: 237
Joined: Tue Dec 02, 2014 11:03 am

Re: Calling all code necks for help..

Post by Shedbuilt » Mon Nov 30, 2015 1:36 pm

radio-berlin wrote: 2nd Problem is the source code low frequency is 87.6 and I would like 87.5, again I cant figure it out in the source code, could somebody please point me in the right direction
I "think", if you change

FROM:

;***************************************************************************
;
; Reading DIP Switch
;
;***************************************************************************

movlw 0x6C
movwf tx_lo


TO:

;***************************************************************************
;
; Reading DIP Switch
;
;***************************************************************************

movlw 0x6B
movwf tx_lo



It should fix this (ie just changing the hex value from 6C to 6B; comments etc just pasted to make it easy to find).....

radio-berlin
no manz can test innit
no manz can test innit
Posts: 137
Joined: Thu Sep 11, 2014 10:01 pm

Re: Calling all code necks for help..

Post by radio-berlin » Mon Nov 30, 2015 7:34 pm

builtinashed wrote:
radio-berlin wrote: 2nd Problem is the source code low frequency is 87.6 and I would like 87.5, again I cant figure it out in the source code, could somebody please point me in the right direction
I "think", if you change

FROM:

;***************************************************************************
;
; Reading DIP Switch
;
;***************************************************************************

movlw 0x6C
movwf tx_lo


TO:

;***************************************************************************
;
; Reading DIP Switch
;
;***************************************************************************

movlw 0x6B
movwf tx_lo



It should fix this (ie just changing the hex value from 6C to 6B; comments etc just pasted to make it easy to find).....
Yes if you scroll up that's what I already changed. I changed 108 to 107 but in hexidecimal.
It worked a dream

Shedbuilt
no manz can test innit
no manz can test innit
Posts: 237
Joined: Tue Dec 02, 2014 11:03 am

Re: Calling all code necks for help..

Post by Shedbuilt » Mon Nov 30, 2015 8:03 pm

Sorry. I missed the post where you said you'd sorted it.

Post Reply